Set ghost permissions after upgrade

This commit is contained in:
Bob Mottram 2017-08-16 18:12:00 +01:00
parent 3afb3077c8
commit 619834af05
1 changed files with 6 additions and 6 deletions

View File

@ -185,6 +185,8 @@ function reconfigure_ghost {
}
function upgrade_ghost {
read_config_param GHOST_DOMAIN_NAME
if [ ! -d /var/www/$GHOST_DOMAIN_NAME/htdocs ]; then
return
fi
@ -200,9 +202,8 @@ function upgrade_ghost {
ghost_replace_services
ghost_remove_offsite_links
if [ -f /usr/local/bin/ghost ]; then
chown root:root /usr/local/bin/ghost
fi
chown root:root /usr/local/bin/ghost
chown -R root:root /usr/local/lib
chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs
systemctl restart ghost
}
@ -529,9 +530,8 @@ function install_ghost {
function_check add_ddns_domain
add_ddns_domain $GHOST_DOMAIN_NAME
if [ -f /usr/local/bin/ghost ]; then
chown root:root /usr/local/bin/ghost
fi
chown root:root /usr/local/bin/ghost
chown -R root:root /usr/local/lib
chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs
set_completion_param "ghost domain" "$GHOST_DOMAIN_NAME"
if ! grep -q "ghost version:" ${COMPLETION_FILE}; then