1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-26 02:57:04 +00:00

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

View File

@ -21,5 +21,14 @@ rm -f /etc/init.d/mailinabox
ln -s $(pwd)/conf/management-initscript /etc/init.d/mailinabox ln -s $(pwd)/conf/management-initscript /etc/init.d/mailinabox
update-rc.d mailinabox defaults 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. # Start it.
service mailinabox restart service mailinabox restart