auto-create cron entry
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#!/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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user