Move remote tox backup to app script

This commit is contained in:
Bob Mottram 2016-07-09 21:52:17 +01:00
parent e3260ed1c9
commit fa4a3a57ce
2 changed files with 10 additions and 14 deletions

View File

@ -47,7 +47,7 @@ TOXIC_COMMIT='cf16849b374e484a33a4dffa3dfb937b59d537f2'
TOXIC_FILE=/usr/local/bin/toxic TOXIC_FILE=/usr/local/bin/toxic
function reconfigure_tox { function reconfigure_tox {
echo -n '' echo -n ''
} }
function upgrade_tox { function upgrade_tox {
@ -105,7 +105,15 @@ function restore_local_tox {
} }
function backup_remote_tox { function backup_remote_tox {
echo -n '' if [ -d /var/lib/tox-bootstrapd ]; then
echo "Backing up Tox node settings"
if [ -d /var/lib/tox-bootstrapd/Maildir ]; then
rm -rf /var/lib/tox-bootstrapd/Maildir
fi
cp /etc/tox-bootstrapd.conf /var/lib/tox-bootstrapd
backup_directory_to_friend /var/lib/tox-bootstrapd tox
echo "Backup of Tox node settings complete"
fi
} }
function restore_remote_tox { function restore_remote_tox {

View File

@ -289,17 +289,6 @@ function backup_voip {
fi fi
} }
function backup_tox {
if [ -d /var/lib/tox-bootstrapd ]; then
echo "Backing up Tox node settings"
if [ -d /var/lib/tox-bootstrapd/Maildir ]; then
rm -rf /var/lib/tox-bootstrapd/Maildir
fi
cp /etc/tox-bootstrapd.conf /var/lib/tox-bootstrapd
backup_directory_to_friend /var/lib/tox-bootstrapd tox
fi
}
function backup_mariadb { function backup_mariadb {
if [ ${#DATABASE_PASSWORD} -gt 1 ]; then if [ ${#DATABASE_PASSWORD} -gt 1 ]; then
if [ ! -d /root/tempmariadb ]; then if [ ! -d /root/tempmariadb ]; then
@ -450,7 +439,6 @@ if [[ $TEST_MODE == "no" ]]; then
backup_mailing_list backup_mailing_list
backup_voip backup_voip
backup_tox
backup_extra_directories backup_extra_directories
fi fi