Browse Source

ghost download url

Bob Mottram 8 years ago
parent
commit
be5dd63e71
1 changed files with 8 additions and 6 deletions
  1. 8
    6
      src/freedombone-app-ghost

+ 8
- 6
src/freedombone-app-ghost View File

@@ -13,7 +13,7 @@
13 13
 # License
14 14
 # =======
15 15
 #
16
-# Copyright (C) 2016 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2016-2017 Bob Mottram <bob@freedombone.net>
17 17
 #
18 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by
@@ -36,8 +36,9 @@ SHOW_ON_ABOUT=1
36 36
 GHOST_DOMAIN_NAME=
37 37
 GHOST_CODE=
38 38
 GHOST_ONION_PORT=8104
39
-GHOST_VERSION='0.11.8'
40 39
 GHOST_PORT=2368
40
+GHOST_VERSION='0.11.8'
41
+GHOST_DOWNLOAD_URL="https://github.com/TryGhost/Ghost/releases/download/${GHOST_VERSION}/Ghost-${GHOST_VERSION}.zip"
41 42
 
42 43
 ghost_variables=(GHOST_VERSION
43 44
                  GHOST_DOMAIN_NAME
@@ -151,10 +152,11 @@ function reconfigure_ghost {
151 152
 
152 153
 function upgrade_ghost {
153 154
     if ! grep -q "ghost version:" $COMPLETION_FILE; then
154
-        return
155
+        CURR_GHOST_VERSION=${GHOST_VERSION}b
156
+    else
157
+        CURR_GHOST_VERSION=$(get_completion_param "ghost version")
155 158
     fi
156 159
 
157
-    CURR_GHOST_VERSION=$(get_completion_param "ghost version")
158 160
     if [[ "$GHOST_VERSION" == "$CURR_GHOST_VERSION" ]]; then
159 161
         return
160 162
     fi
@@ -164,7 +166,7 @@ function upgrade_ghost {
164 166
     GHOST_PATH=/var/www/$GHOST_DOMAIN_NAME/htdocs
165 167
 
166 168
     cd $GHOST_PATH
167
-    wget https://ghost.org/zip/ghost-${GHOST_VERSION}.zip
169
+    wget ${GHOST_DOWNLOAD_URL}
168 170
     if [ ! -f ghost-${GHOST_VERSION}.zip ]; then
169 171
         echo $'Unable to download ghost'
170 172
         rm -rf /var/www/$GHOST_DOMAIN_NAME
@@ -365,7 +367,7 @@ function install_ghost {
365 367
         mkdir -p /var/www/$GHOST_DOMAIN_NAME/htdocs
366 368
     fi
367 369
     cd /var/www/$GHOST_DOMAIN_NAME/htdocs
368
-    wget https://ghost.org/zip/ghost-${GHOST_VERSION}.zip
370
+    wget ${GHOST_DOWNLOAD_URL}
369 371
     if [ ! -f ghost-${GHOST_VERSION}.zip ]; then
370 372
         echo $'Unable to download ghost'
371 373
         rm -rf /var/www/$GHOST_DOMAIN_NAME