From 81be48d180e2da0dbea9a2dffcd83aa92627c06f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 30 Jul 2017 16:55:53 +0100 Subject: [PATCH] Enable sks after restore --- src/freedombone-app-keyserver | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/freedombone-app-keyserver b/src/freedombone-app-keyserver index 728201d5..189f36ba 100755 --- a/src/freedombone-app-keyserver +++ b/src/freedombone-app-keyserver @@ -60,7 +60,7 @@ function keyserver_watchdog { ADMIN_USERNAME=$(cat $COMPLETION_FILE | grep "Admin user" | awk -F ':' '{print $2}') ADMIN_EMAIL_ADDRESS=${ADMIN_USERNAME}@${HOSTNAME} keyserver_size_warning=$"The SKS keyserver database is getting large. Check that you aren't being spammed" - keyserver_disabled_warning=$"The SKS keyserver has been disabled because it is getting too large. This is to prevent flooding attacks from crashing the server." + keyserver_disabled_warning=$"The SKS keyserver has been disabled because it is getting too large. This is to prevent flooding attacks from crashing the server. You may need to restore the keyserver from backup." keyserver_mail_subject_line=$"${PROJECT_NAME} keyserver warning" keyserver_mail_subject_line_disabled=$"${PROJECT_NAME} keyserver disabled" read_config_param KEYSERVER_DOMAIN_NAME @@ -218,7 +218,9 @@ function restore_local_keyserver { # remove the old database rm -rf /var/lib/sks/DB_prev + systemctl enable sks systemctl start sks + nginx_ensite $KEYSERVER_DOMAIN_NAME } function backup_remote_keyserver { @@ -284,7 +286,9 @@ function restore_remote_keyserver { # remove the old database rm -rf /var/lib/sks/DB_prev + systemctl enable sks systemctl start sks + nginx_ensite $KEYSERVER_DOMAIN_NAME } function remove_keyserver {