From 14afd044734402835d052eed9b053cc9c242350b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 1 Aug 2017 09:38:27 +0100 Subject: [PATCH 1/2] cryptpad 1.12.0 --- src/freedombone-app-cryptpad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-app-cryptpad b/src/freedombone-app-cryptpad index 4e32af1a..44722da7 100755 --- a/src/freedombone-app-cryptpad +++ b/src/freedombone-app-cryptpad @@ -37,7 +37,7 @@ SHOW_ICANN_ADDRESS_ON_ABOUT=0 CRYPTPAD_ONION_PORT=8119 CRYPTPAD_PORT=9003 CRYPTPAD_REPO="https://github.com/xwiki-labs/cryptpad" -CRYPTPAD_COMMIT='76e69f0ba85b0e3e21cad2c3eb0012c2429d4bb8' +CRYPTPAD_COMMIT='0b69973c179efc6f770a1127f07f67de3d6724d1' CRYPTPAD_DIR=/etc/cryptpad cryptpad_variables=(ONION_ONLY) From da30734ba9c39c4693471ab98d46220c17cea0b7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 1 Aug 2017 09:49:42 +0100 Subject: [PATCH 2/2] Stop ghost before updating --- src/freedombone-app-ghost | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/freedombone-app-ghost b/src/freedombone-app-ghost index 65a3f314..7767c1b4 100755 --- a/src/freedombone-app-ghost +++ b/src/freedombone-app-ghost @@ -46,6 +46,12 @@ ghost_variables=(GHOST_DOMAIN_NAME DDNS_PROVIDER MY_USERNAME) +function ghost_bust { + # kill the started ghost process + kill_pid=$(ps aux | grep "ghost run" | awk -F ' ' '{print $2}' | head -n 1) + kill $kill_pid +} + function logging_on_ghost { echo -n '' } @@ -182,10 +188,14 @@ function upgrade_ghost { if [ ! -d /var/www/$GHOST_DOMAIN_NAME/htdocs ]; then return fi + + systemctl stop ghost + cd /var/www/$GHOST_DOMAIN_NAME/htdocs npm i -g ghost-cli /usr/local/bin/ghost update + ghost_bust ghost_replace_services ghost_remove_offsite_links @@ -395,9 +405,7 @@ function install_ghost { ghost install local --port ${GHOST_PORT} - # kill the started ghost process - kill_pid=$(ps aux | grep "ghost run" | awk -F ' ' '{print $2}' | head -n 1) - kill $kill_pid + ghost_bust # NOTE: this has to be http, not https sed -i "s|\"url\":|\"url\": \"http://${GHOST_DOMAIN_NAME}/\",|g" /var/www/${GHOST_DOMAIN_NAME}/htdocs/config.development.json