Pārlūkot izejas kodu

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram 7 gadus atpakaļ
vecāks
revīzija
962cb6cf13
2 mainītis faili ar 12 papildinājumiem un 4 dzēšanām
  1. 1
    1
      src/freedombone-app-cryptpad
  2. 11
    3
      src/freedombone-app-ghost

+ 1
- 1
src/freedombone-app-cryptpad Parādīt failu

@@ -37,7 +37,7 @@ SHOW_ICANN_ADDRESS_ON_ABOUT=0
37 37
 CRYPTPAD_ONION_PORT=8119
38 38
 CRYPTPAD_PORT=9003
39 39
 CRYPTPAD_REPO="https://github.com/xwiki-labs/cryptpad"
40
-CRYPTPAD_COMMIT='76e69f0ba85b0e3e21cad2c3eb0012c2429d4bb8'
40
+CRYPTPAD_COMMIT='0b69973c179efc6f770a1127f07f67de3d6724d1'
41 41
 CRYPTPAD_DIR=/etc/cryptpad
42 42
 
43 43
 cryptpad_variables=(ONION_ONLY)

+ 11
- 3
src/freedombone-app-ghost Parādīt failu

@@ -46,6 +46,12 @@ ghost_variables=(GHOST_DOMAIN_NAME
46 46
                  DDNS_PROVIDER
47 47
                  MY_USERNAME)
48 48
 
49
+function ghost_bust {
50
+    # kill the started ghost process
51
+    kill_pid=$(ps aux | grep "ghost run" | awk -F ' ' '{print $2}' | head -n 1)
52
+    kill $kill_pid
53
+}
54
+
49 55
 function logging_on_ghost {
50 56
     echo -n ''
51 57
 }
@@ -182,10 +188,14 @@ function upgrade_ghost {
182 188
     if [ ! -d /var/www/$GHOST_DOMAIN_NAME/htdocs ]; then
183 189
         return
184 190
     fi
191
+
192
+    systemctl stop ghost
193
+
185 194
     cd /var/www/$GHOST_DOMAIN_NAME/htdocs
186 195
 
187 196
     npm i -g ghost-cli
188 197
     /usr/local/bin/ghost update
198
+    ghost_bust
189 199
 
190 200
     ghost_replace_services
191 201
     ghost_remove_offsite_links
@@ -395,9 +405,7 @@ function install_ghost {
395 405
 
396 406
     ghost install local --port ${GHOST_PORT}
397 407
 
398
-    # kill the started ghost process
399
-    kill_pid=$(ps aux | grep "ghost run" | awk -F ' ' '{print $2}' | head -n 1)
400
-    kill $kill_pid
408
+    ghost_bust
401 409
 
402 410
     # NOTE: this has to be http, not https
403 411
     sed -i "s|\"url\":|\"url\": \"http://${GHOST_DOMAIN_NAME}/\",|g" /var/www/${GHOST_DOMAIN_NAME}/htdocs/config.development.json