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:
parent
9747f14306
commit
d90ac95cdb
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue