install the backup script as a daily cron job

This commit is contained in:
Joshua Tauberer 2014-06-26 10:46:22 +00:00
parent 87f001a5d5
commit 573faa2bf5
1 changed files with 9 additions and 0 deletions

View File

@ -21,5 +21,14 @@ rm -f /etc/init.d/mailinabox
ln -s $(pwd)/conf/management-initscript /etc/init.d/mailinabox
update-rc.d mailinabox defaults
# Perform a daily backup.
cat > /etc/cron.daily/mailinabox-backup << EOF;
#!/bin/bash
# Mail-in-a-Box --- Do not edit / will be overwritten on update.
# Perform a backup.
$(pwd)/management/backup.py
EOF
chmod +x /etc/cron.daily/mailinabox-backup
# Start it.
service mailinabox restart