|
@@ -49,7 +49,10 @@ ghost_variables=(GHOST_DOMAIN_NAME
|
49
|
49
|
function ghost_bust {
|
50
|
50
|
# kill the started ghost process
|
51
|
51
|
kill_pid=$(ps aux | grep "ghost run" | awk -F ' ' '{print $2}' | head -n 1)
|
52
|
|
- kill $kill_pid
|
|
52
|
+ kill -9 $kill_pid
|
|
53
|
+
|
|
54
|
+ kill_pid=$(ps aux | grep "ghost" | awk -F ' ' '{print $2}' | head -n 1)
|
|
55
|
+ kill -9 $kill_pid
|
53
|
56
|
}
|
54
|
57
|
|
55
|
58
|
function logging_on_ghost {
|
|
@@ -185,6 +188,8 @@ function reconfigure_ghost {
|
185
|
188
|
}
|
186
|
189
|
|
187
|
190
|
function upgrade_ghost {
|
|
191
|
+ read_config_param GHOST_DOMAIN_NAME
|
|
192
|
+
|
188
|
193
|
if [ ! -d /var/www/$GHOST_DOMAIN_NAME/htdocs ]; then
|
189
|
194
|
return
|
190
|
195
|
fi
|
|
@@ -200,9 +205,8 @@ function upgrade_ghost {
|
200
|
205
|
ghost_replace_services
|
201
|
206
|
ghost_remove_offsite_links
|
202
|
207
|
|
203
|
|
- if [ -f /usr/local/bin/ghost ]; then
|
204
|
|
- chown root:root /usr/local/bin/ghost
|
205
|
|
- fi
|
|
208
|
+ chown root:root /usr/local/bin/ghost
|
|
209
|
+ chown -R root:root /usr/local/lib
|
206
|
210
|
chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs
|
207
|
211
|
systemctl restart ghost
|
208
|
212
|
}
|
|
@@ -529,9 +533,8 @@ function install_ghost {
|
529
|
533
|
function_check add_ddns_domain
|
530
|
534
|
add_ddns_domain $GHOST_DOMAIN_NAME
|
531
|
535
|
|
532
|
|
- if [ -f /usr/local/bin/ghost ]; then
|
533
|
|
- chown root:root /usr/local/bin/ghost
|
534
|
|
- fi
|
|
536
|
+ chown root:root /usr/local/bin/ghost
|
|
537
|
+ chown -R root:root /usr/local/lib
|
535
|
538
|
chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs
|
536
|
539
|
set_completion_param "ghost domain" "$GHOST_DOMAIN_NAME"
|
537
|
540
|
if ! grep -q "ghost version:" ${COMPLETION_FILE}; then
|