Remove legacy backup variables

This commit is contained in:
Bob Mottram 2015-12-11 14:45:21 +00:00
parent cfbe634643
commit bafed779e3
1 changed files with 1 additions and 16 deletions

View File

@ -260,15 +260,9 @@ UPGRADE_SCRIPT_NAME="${PROJECT_NAME}-upgrade"
# name of a script which keeps running processes going even if they crash # name of a script which keeps running processes going even if they crash
WATCHDOG_SCRIPT_NAME="keepon" WATCHDOG_SCRIPT_NAME="keepon"
# the type of backup system used, rsync or obnam
BACKUP_TYPE='obnam'
# Number of days to keep backups for # Number of days to keep backups for
BACKUP_MAX_DAYS=30 BACKUP_MAX_DAYS=30
# Location of the certificate used to encrypt backups
BACKUP_CERTIFICATE=/etc/ssl/private/backup.key
# memory limit for php in MB # memory limit for php in MB
MAX_PHP_MEMORY=64 MAX_PHP_MEMORY=64
@ -949,9 +943,6 @@ function read_configuration {
if grep -q "IPFS_PORT" $CONFIGURATION_FILE; then if grep -q "IPFS_PORT" $CONFIGURATION_FILE; then
IPFS_PORT=$(grep "IPFS_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}') IPFS_PORT=$(grep "IPFS_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "BACKUP_TYPE" $CONFIGURATION_FILE; then
BACKUP_TYPE=$(grep "BACKUP_TYPE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TRACKER_PORT" $CONFIGURATION_FILE; then if grep -q "TRACKER_PORT" $CONFIGURATION_FILE; then
TRACKER_PORT=$(grep "TRACKER_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}') TRACKER_PORT=$(grep "TRACKER_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
@ -1110,9 +1101,6 @@ function read_configuration {
if grep -q "CJDNS_PRIVATE_KEY" $CONFIGURATION_FILE; then if grep -q "CJDNS_PRIVATE_KEY" $CONFIGURATION_FILE; then
CJDNS_PRIVATE_KEY=$(grep "CJDNS_PRIVATE_KEY" $CONFIGURATION_FILE | awk -F '=' '{print $2}') CJDNS_PRIVATE_KEY=$(grep "CJDNS_PRIVATE_KEY" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
if grep -q "BACKUP_CERTIFICATE" $CONFIGURATION_FILE; then
BACKUP_CERTIFICATE=$(grep "BACKUP_CERTIFICATE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE; then if grep -q "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE; then
ROUTER_IP_ADDRESS=$(grep "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}') ROUTER_IP_ADDRESS=$(grep "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
@ -3023,7 +3011,7 @@ function initial_setup {
apt-get -y remove --purge apache* apt-get -y remove --purge apache*
apt-get -y dist-upgrade apt-get -y dist-upgrade
apt-get -y install ca-certificates emacs24 cpulimit apt-get -y install ca-certificates emacs24 cpulimit
apt-get -y install rsyncrypto cryptsetup libgfshare-bin obnam sshpass apt-get -y install cryptsetup libgfshare-bin obnam sshpass
echo 'initial_setup' >> $COMPLETION_FILE echo 'initial_setup' >> $COMPLETION_FILE
} }
@ -4575,9 +4563,6 @@ function configure_backup_key {
if grep -Fxq "configure_backup_key" $COMPLETION_FILE; then if grep -Fxq "configure_backup_key" $COMPLETION_FILE; then
return return
fi fi
if [[ $BACKUP_TYPE != 'obnam' ]]; then
return
fi
apt-get -y install gnupg apt-get -y install gnupg
BACKUP_KEY_EXISTS=$(gpg_key_exists "root" "$MY_NAME (backup key)") BACKUP_KEY_EXISTS=$(gpg_key_exists "root" "$MY_NAME (backup key)")