mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 21:18:36 -06:00
Added crontab-bk.sh
This commit is contained in:
parent
46d64aebaa
commit
8d2295c38b
1 changed files with 14 additions and 0 deletions
14
crontab-bk.sh
Normal file
14
crontab-bk.sh
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# this is a script to backup crontab data
|
||||||
|
# put this inside /etc/cron.daily
|
||||||
|
|
||||||
|
# define location for output
|
||||||
|
DIR=/home/sintan/Documents/Backup/pkglists
|
||||||
|
|
||||||
|
# make sure that the folder exists
|
||||||
|
mkdir -p $DIR
|
||||||
|
|
||||||
|
ls /etc/cron.hourly/ /etc/cron.daily/ /etc/cron.weekly/ /etc/cron.monthly/ > $DIR/crontab
|
||||||
|
echo "-----------------" >> $DIR/crontab
|
||||||
|
crontab -l >> $DIR/crontab
|
Loading…
Reference in a new issue