diff --git a/scripts/change_url b/scripts/change_url index c5594df..44d2151 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -65,12 +65,12 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 +systemctl daemon-reload + ynh_systemd_action --service_name="influxdb" --action="start" ynh_systemd_action --service_name="scrutiny-web-server.service" --action="start" --log_path="/var/log/$app/web-server.log" if [ $collector -eq 1 ] then - systemctl daemon-reload - ynh_systemd_action --service_name="scrutiny-collector.service" --action="start" --log_path="/var/log/$app/collector.log" ynh_systemd_action --service_name="scrutiny-collector.timer" --action="start" --log_path="/var/log/$app/collector.log" fi diff --git a/scripts/install b/scripts/install index d10f47c..56adc22 100755 --- a/scripts/install +++ b/scripts/install @@ -39,7 +39,7 @@ ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config --service="scrutiny-web-server" --template="systemd-scrutiny-web-server.service" -yunohost service add "scrutiny-web-server" --description="WebUI for smartd S.M.A.R.T monitoring" --log="/var/log/$app/web-server.log" +yunohost service add "scrutiny-web-server" --description="WebUI for smartd S.M.A.R.T monitoring" --log="/var/log/$app/web-server.log" --test_status="systemctl show scrutiny-web-server.service -p ActiveState --value | grep -v failed" ynh_add_config --template="systemd-scrutiny-collector.service" --destination="/etc/systemd/system/scrutiny-collector.service" if [ $collector -eq 1 ] diff --git a/scripts/restore b/scripts/restore index 7665e4c..ca7ba3d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -46,7 +46,7 @@ ynh_systemd_action --service_name="influxdb" --action="enable" ynh_systemd_action --service_name="influxdb" --action="start" systemctl enable "/etc/systemd/system/scrutiny-web-server.service" --quiet -yunohost service add "scrutiny-web-server" --description="WebUI for smartd S.M.A.R.T monitoring" --log="/var/log/$app/web-server.log" +yunohost service add "scrutiny-web-server" --description="WebUI for smartd S.M.A.R.T monitoring" --log="/var/log/$app/web-server.log" --test_status="systemctl show scrutiny-web-server.service -p ActiveState --value | grep -v failed" ynh_systemd_action --service_name="scrutiny-web-server.service" --action="start" --log_path="/var/log/$app/web-server.log" if [ $collector -eq 1 ] diff --git a/scripts/upgrade b/scripts/upgrade index 6f5231d..602114f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -62,7 +62,7 @@ ynh_script_progression --message="Upgrading system configurations related to $ap ynh_add_nginx_config ynh_add_systemd_config --service="scrutiny-web-server" --template="systemd-scrutiny-web-server.service" -yunohost service add "scrutiny-web-server" --description="WebUI for smartd S.M.A.R.T monitoring" --log="/var/log/$app/web-server.log" +yunohost service add "scrutiny-web-server" --description="WebUI for smartd S.M.A.R.T monitoring" --log="/var/log/$app/web-server.log" --test_status="systemctl show scrutiny-web-server.service -p ActiveState --value | grep -v failed" ynh_add_config --template="systemd-scrutiny-collector.service" --destination="/etc/systemd/system/scrutiny-collector.service" if [ $collector -eq 1 ]