diff --git a/scripts/install b/scripts/install index 2919a20..b7eb8a4 100755 --- a/scripts/install +++ b/scripts/install @@ -77,6 +77,8 @@ ynh_use_logrotate --logfile "/var/log/$app" ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name="$app" --action="start" --log_path 'systemd' --line_match ' - Ok, ready.' +# when we change the value of 'listen [::1]:xxx;' nginx don't reload correctly the config, so force to restart to ensure that the new config are loaded +ynh_systemd_action --service_name=nginx.service --action=restart save_vars_current_value #================================================= diff --git a/scripts/restore b/scripts/restore index 510f67e..23e5795 100755 --- a/scripts/restore +++ b/scripts/restore @@ -59,7 +59,8 @@ ynh_use_logrotate --logfile "/var/log/$app" ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_systemd_action --service_name="$app" --action=start --log_path 'systemd' --line_match ' - Ok, ready.' - +# when we change the value of 'listen [::1]:xxx;' nginx don't reload correctly the config, so force to restart to ensure that the new config are loaded +ynh_systemd_action --service_name=nginx.service --action=restart ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1877fbe..164baa1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -112,6 +112,8 @@ ynh_use_logrotate --logfile "/var/log/$app" ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name="$app" --action=restart --log_path=systemd --line_match ' - Ok, ready.' +# when we change the value of 'listen [::1]:xxx;' nginx don't reload correctly the config, so force to restart to ensure that the new config are loaded +ynh_systemd_action --service_name=nginx.service --action=restart save_vars_current_value #=================================================