diff --git a/scripts/install b/scripts/install index e1210ca..f6ff792 100644 --- a/scripts/install +++ b/scripts/install @@ -7,6 +7,7 @@ #================================================= source _common.sh +source ynh_systemd_action source /usr/share/yunohost/helpers #================================================= @@ -243,8 +244,7 @@ systemctl reload nginx #================================================= ynh_print_info "Reloading OnlyOffice..." -supervisorctl stop all -supervisorctl start all +ynh_systemd_action --service_name=supervisor --action=restart --line_match="INFO success: docservice entered RUNNING state" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index 3485d9c..54afadd 100644 --- a/scripts/remove +++ b/scripts/remove @@ -7,6 +7,7 @@ #================================================= source _common.sh +source ynh_systemd_action source /usr/share/yunohost/helpers #================================================= @@ -28,7 +29,7 @@ final_path=$(ynh_app_setting_get $app final_path) #================================================= ynh_print_info "Stopping OnlyOffice" -supervisorctl stop all +ynh_systemd_action --service_name=supervisor --action=stop --log_path="systemd" #================================================= # REMOVE THE POSTGRESQL DATABASE diff --git a/scripts/restore b/scripts/restore index 46931f0..e584af3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -7,6 +7,7 @@ #================================================= source ../settings/scripts/_common.sh +source ../settings/scripts/ynh_systemd_action source /usr/share/yunohost/helpers #================================================= @@ -130,8 +131,7 @@ systemctl reload nginx #================================================= ynh_print_info "Reloading OnlyOffice..." -supervisorctl stop all -supervisorctl start all +ynh_systemd_action --service_name=supervisor --action=restart --line_match="INFO success: docservice entered RUNNING state" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/upgrade b/scripts/upgrade index 2a0a4d9..5ea385d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,6 +7,7 @@ #================================================= source _common.sh +source ynh_systemd_action source /usr/share/yunohost/helpers #================================================= @@ -146,8 +147,7 @@ systemctl reload nginx #================================================= ynh_print_info "Reloading OnlyOffice..." -supervisorctl stop all -supervisorctl start all +ynh_systemd_action --service_name=supervisor --action=restart --line_match="INFO success: docservice entered RUNNING state" --log_path="systemd" #================================================= # END OF SCRIPT