Skip to content
Snippets Groups Projects
Commit 7d4e2081 authored by Bob Mottram's avatar Bob Mottram
Browse files

Backup and restore squirrelmail settings

parent eabd9b2b
No related branches found
No related tags found
No related merge requests found
......@@ -299,6 +299,14 @@ function backup_blocklist {
rm -rf $temp_backup_dir
}
function backup_squirrelmail {
if [ ! -d /var/local/squirrelmail ]; then
return
fi
echo $"Backing up ${PROJECT_NAME} squirrelmail"
backup_directory_to_usb /var/local/squirrelmail squirrelmail
}
function backup_configfiles {
echo $"Backing up ${PROJECT_NAME} configuration files"
temp_backup_dir=/root/tempbackupconfig
......@@ -483,6 +491,7 @@ backup_directories
backup_apps local
backup_configfiles
backup_blocklist
backup_squirrelmail
backup_mariadb
backup_postgresql
backup_extra_directories local
......
......@@ -130,6 +130,19 @@ function restore_blocklist {
fi
}
function restore_squirrelmail {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'squirrelmail' ]]; then
return
fi
fi
if [ -d $USB_MOUNT/backup/squirrelmail ]; then
echo $"Restoring squirrelmail"
restore_directory_from_usb /var/local/squirrelmail squirrelmail
fi
}
function restore_configfiles {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'configfiles' ]]; then
......@@ -992,6 +1005,9 @@ increment_restore_progress
restore_blocklist
increment_restore_progress
restore_squirrelmail
increment_restore_progress
restore_configfiles
increment_restore_progress
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment