From be5dd63e71057d92b12028e2b0ea5aa3aa60ed2b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 11 May 2017 21:53:59 +0100 Subject: [PATCH] ghost download url --- src/freedombone-app-ghost | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/freedombone-app-ghost b/src/freedombone-app-ghost index a4a7b469..9c8d7210 100755 --- a/src/freedombone-app-ghost +++ b/src/freedombone-app-ghost @@ -13,7 +13,7 @@ # License # ======= # -# Copyright (C) 2016 Bob Mottram +# Copyright (C) 2016-2017 Bob Mottram # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -36,8 +36,9 @@ SHOW_ON_ABOUT=1 GHOST_DOMAIN_NAME= GHOST_CODE= GHOST_ONION_PORT=8104 -GHOST_VERSION='0.11.8' GHOST_PORT=2368 +GHOST_VERSION='0.11.8' +GHOST_DOWNLOAD_URL="https://github.com/TryGhost/Ghost/releases/download/${GHOST_VERSION}/Ghost-${GHOST_VERSION}.zip" ghost_variables=(GHOST_VERSION GHOST_DOMAIN_NAME @@ -151,10 +152,11 @@ function reconfigure_ghost { function upgrade_ghost { if ! grep -q "ghost version:" $COMPLETION_FILE; then - return + CURR_GHOST_VERSION=${GHOST_VERSION}b + else + CURR_GHOST_VERSION=$(get_completion_param "ghost version") fi - CURR_GHOST_VERSION=$(get_completion_param "ghost version") if [[ "$GHOST_VERSION" == "$CURR_GHOST_VERSION" ]]; then return fi @@ -164,7 +166,7 @@ function upgrade_ghost { GHOST_PATH=/var/www/$GHOST_DOMAIN_NAME/htdocs cd $GHOST_PATH - wget https://ghost.org/zip/ghost-${GHOST_VERSION}.zip + wget ${GHOST_DOWNLOAD_URL} if [ ! -f ghost-${GHOST_VERSION}.zip ]; then echo $'Unable to download ghost' rm -rf /var/www/$GHOST_DOMAIN_NAME @@ -365,7 +367,7 @@ function install_ghost { mkdir -p /var/www/$GHOST_DOMAIN_NAME/htdocs fi cd /var/www/$GHOST_DOMAIN_NAME/htdocs - wget https://ghost.org/zip/ghost-${GHOST_VERSION}.zip + wget ${GHOST_DOWNLOAD_URL} if [ ! -f ghost-${GHOST_VERSION}.zip ]; then echo $'Unable to download ghost' rm -rf /var/www/$GHOST_DOMAIN_NAME