1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ghost_ynh.git synced 2024-09-03 19:16:02 +02:00

Ensure does not need any prompt

This commit is contained in:
tituspijean 2023-08-27 19:00:48 +02:00
parent 9747f14306
commit d90ac95cdb
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -24,9 +24,15 @@ if [ -z "$db_name" ]; then
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
fi
# Make sure the .config directory belongs to $app:$app
if [[ $(stat -c "%U:%G" $install_dir/.config) != "$app:$app" ]]; then
chown -R $app:$app $install_dir/.config
fi
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
# We stop the service first because the compatibility fixes might edit the configuration file of the app.
ynh_script_progression --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app --action=stop --log_path="systemd" --line_match="Ghost has shut down" --timeout=60
@ -100,8 +106,10 @@ else
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install ghost-cli@latest
popd
# Upgrade Ghost itself
pushd $install_dir/ghost
# Make sure the app does not expect to manage its own process
ynh_exec_as $app $ynh_node_load_PATH $install_dir/node_modules/ghost-cli/bin/ghost config --process local
# Upgrade Ghost itself
ynh_exec_as $app $ynh_node_load_PATH $install_dir/node_modules/ghost-cli/bin/ghost update $(ynh_app_upstream_version) \
--no-prompt --no-auto-rollback --no-restart
popd