diff --git a/ct/ghost.sh b/ct/ghost.sh index 0ec3dc4e..316fbf71 100644 --- a/ct/ghost.sh +++ b/ct/ghost.sh @@ -30,9 +30,10 @@ function update_script() { check_container_storage check_container_resources msg_info "Updating ${APP} LXC" - # CHECK FOR NPM HERE ! + # CHECK FOR NPM HERE ! + if command -v ghost &> /dev/null; then - current_version=$(ghost --version | awk '{print $2}') + current_version=$(ghost --version | awk '{print $2}') #TO REVIEW latest_version=$(npm show ghost-cli version) if [ "$current_version" != "$latest_version" ]; then msg_info "Updating ${APP} from version $current_version to $latest_version" diff --git a/install/ghost-install.sh b/install/ghost-install.sh index c50039d4..35d40670 100644 --- a/install/ghost-install.sh +++ b/install/ghost-install.sh @@ -66,7 +66,7 @@ msg_info "Setting up Ghost" mkdir -p /var/www/ghost chown -R ghost-user:ghost-user /var/www/ghost chmod 775 /var/www/ghost -sudo -u ghost-user -H sh -c "cd /var/www/ghost && ghost install --db=mysql --dbhost=localhost --dbuser=root --dbpass=ghost --dbname=ghost --no-prompt --no-setup-linux-user --no-setup-nginx --no-setup-ssl --no-setup-systemd" +sudo -u ghost-user -H sh -c "cd /var/www/ghost && ghost install --db=mysql --dbhost=localhost --dbuser=root --dbpass=ghost --dbname=ghost --url=http://localhost:2368 --no-prompt --no-setup-linux-user --no-setup-nginx --no-setup-ssl --no-setup-systemd --no-setup-mysql --no-start --no-enable" msg_ok "Ghost setup completed" # Creating Service (if needed) @@ -77,8 +77,10 @@ Description=${APPLICATION} Service After=network.target [Service] -ExecStart=/usr/bin/ghost run +ExecStart=/usr/bin/ghost start WorkingDirectory=/var/www/ghost +User=ghost-user +Group=ghost-user Restart=always [Install]