|
@@ -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
|