auto-create cron entry

This commit is contained in:
2015-06-29 12:03:05 +03:00
parent 10d70318d6
commit 09251a8a82
2 changed files with 6 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
# echo "0 11 * * * root /root/scripts/server/back-cfg.sh" > /etc/cron.d/back-cfg if [ ! -e /etc/cron.d/back-cfg ]; then
echo "0 11 * * * root /root/scripts/server/back-cfg.sh" > /etc/cron.d/back-cfg
fi
BAKDIR=/root/backup/cfg BAKDIR=/root/backup/cfg

View File

@@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
# echo "0 14 * * * root /root/scripts/server/back-web.sh" > /etc/cron.d/back-web if [ ! -e /etc/cron.d/back-web ]; then
echo "0 14 * * * root /root/scripts/server/back-web.sh" > /etc/cron.d/back-web
fi
BAKDIR=/root/backup/web BAKDIR=/root/backup/web
DATE=$(date +%y%m%d-%H%M) DATE=$(date +%y%m%d-%H%M)