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
# 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
DATE=$(date +%y%m%d-%H%M)