From 11b01bfe253625a95af840ee3345ca766c2a4ebf Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 30 Jul 2017 18:32:20 +0100 Subject: [PATCH 1/3] Also upgrade ghost-cli --- src/freedombone-app-ghost | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedombone-app-ghost b/src/freedombone-app-ghost index e82c69d2..9c365d70 100755 --- a/src/freedombone-app-ghost +++ b/src/freedombone-app-ghost @@ -175,6 +175,7 @@ function upgrade_ghost { return fi cd /var/www/$GHOST_DOMAIN_NAME/htdocs + npm i -g ghost-cli /usr/local/bin/ghost update ghost_replace_services ghost_remove_offsite_links From f3962032578f0cbcaad7fdc82624caa32fb7907b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 30 Jul 2017 22:08:47 +0100 Subject: [PATCH 2/3] Fix ghost --- src/freedombone-app-ghost | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/freedombone-app-ghost b/src/freedombone-app-ghost index 9c365d70..d7e0127b 100755 --- a/src/freedombone-app-ghost +++ b/src/freedombone-app-ghost @@ -1,4 +1,4 @@ -#!/bin/bash +emacs#!/bin/bash # # .---. . . # | | | @@ -175,10 +175,13 @@ function upgrade_ghost { return fi cd /var/www/$GHOST_DOMAIN_NAME/htdocs + npm i -g ghost-cli /usr/local/bin/ghost update + ghost_replace_services ghost_remove_offsite_links + chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs systemctl restart ghost } @@ -379,7 +382,17 @@ function install_ghost { # now install ghost itself npm install -g ghost-cli - ghost install local + + GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT}) + + 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 + + # 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 adduser --system --home=/var/www/${GHOST_DOMAIN_NAME}/htdocs/ --group ghost @@ -393,7 +406,7 @@ function install_ghost { echo 'User=ghost' >> /etc/systemd/system/ghost.service echo 'Group=ghost' >> /etc/systemd/system/ghost.service echo "WorkingDirectory=/var/www/${GHOST_DOMAIN_NAME}/htdocs" >> /etc/systemd/system/ghost.service - echo "ExecStart=/usr/local/bin/ghost run" >> /etc/systemd/system/ghost.service + echo "ExecStart=/usr/local/bin/ghost run -D" >> /etc/systemd/system/ghost.service echo "ExecStop=/usr/local/bin/ghost stop" >> /etc/systemd/system/ghost.service echo "ExecRestart=/usr/local/bin/ghost restart" >> /etc/systemd/system/ghost.service echo 'Restart=always' >> /etc/systemd/system/ghost.service @@ -411,8 +424,6 @@ function install_ghost { systemctl daemon-reload systemctl start ghost - GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT}) - if [[ ${ONION_ONLY} == "no" ]]; then function_check nginx_http_redirect nginx_http_redirect ${GHOST_DOMAIN_NAME} From 4398c8b976a5963010847ca8a2ac56e5cb62a62a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 31 Jul 2017 10:23:00 +0100 Subject: [PATCH 3/3] Don't need sks repo --- src/freedombone-image-customise | 1 - 1 file changed, 1 deletion(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index f6f6b479..2c22c1c9 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -1275,7 +1275,6 @@ function image_preinstall_repos { git clone $TOXIC_REPO $rootdir/repos/toxic git clone $TURTL_REPO $rootdir/repos/turtl git clone $KANBOARD_REPO $rootdir/repos/kanboard - git clone $KEYSERVER_SKS_REPO $rootdir/repos/keyserver git clone $KEYSERVER_WEB_REPO $rootdir/repos/keyserverweb #git clone $WEKAN_REPO $rootdir/repos/wekan #git clone $FLOW_ROUTER_REPO $rootdir/repos/flowrouter