This commit is contained in:
Bob Mottram 2017-08-16 18:24:49 +01:00
commit b4b9c54c81
1 changed files with 10 additions and 7 deletions

View File

@ -49,7 +49,10 @@ ghost_variables=(GHOST_DOMAIN_NAME
function ghost_bust { function ghost_bust {
# kill the started ghost process # kill the started ghost process
kill_pid=$(ps aux | grep "ghost run" | awk -F ' ' '{print $2}' | head -n 1) kill_pid=$(ps aux | grep "ghost run" | awk -F ' ' '{print $2}' | head -n 1)
kill $kill_pid kill -9 $kill_pid
kill_pid=$(ps aux | grep "ghost" | awk -F ' ' '{print $2}' | head -n 1)
kill -9 $kill_pid
} }
function logging_on_ghost { function logging_on_ghost {
@ -185,6 +188,8 @@ function reconfigure_ghost {
} }
function upgrade_ghost { function upgrade_ghost {
read_config_param GHOST_DOMAIN_NAME
if [ ! -d /var/www/$GHOST_DOMAIN_NAME/htdocs ]; then if [ ! -d /var/www/$GHOST_DOMAIN_NAME/htdocs ]; then
return return
fi fi
@ -200,9 +205,8 @@ function upgrade_ghost {
ghost_replace_services ghost_replace_services
ghost_remove_offsite_links ghost_remove_offsite_links
if [ -f /usr/local/bin/ghost ]; then chown root:root /usr/local/bin/ghost
chown root:root /usr/local/bin/ghost chown -R root:root /usr/local/lib
fi
chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs
systemctl restart ghost systemctl restart ghost
} }
@ -529,9 +533,8 @@ function install_ghost {
function_check add_ddns_domain function_check add_ddns_domain
add_ddns_domain $GHOST_DOMAIN_NAME add_ddns_domain $GHOST_DOMAIN_NAME
if [ -f /usr/local/bin/ghost ]; then chown root:root /usr/local/bin/ghost
chown root:root /usr/local/bin/ghost chown -R root:root /usr/local/lib
fi
chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs
set_completion_param "ghost domain" "$GHOST_DOMAIN_NAME" set_completion_param "ghost domain" "$GHOST_DOMAIN_NAME"
if ! grep -q "ghost version:" ${COMPLETION_FILE}; then if ! grep -q "ghost version:" ${COMPLETION_FILE}; then