From 3c98eca468cdc6982291a37d7eaf69998b3b09aa Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 31 Mar 2023 21:00:19 +0200 Subject: [PATCH 1/4] Update updater.yml --- .github/workflows/updater.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index 392e0ec..0941a49 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: # Run it every day at 6:00 UTC schedule: - - cron: '0 6 */7 * *' + - cron: '0 6 * * *' jobs: updater: runs-on: ubuntu-latest From b3e165a4530b5cb61cee9a5fc3923f756588e06f Mon Sep 17 00:00:00 2001 From: ewilly Date: Mon, 3 Apr 2023 09:08:54 +0200 Subject: [PATCH 2/4] Fix --- conf/config/collector.yaml | 2 +- manifest.toml | 2 +- scripts/install | 5 +++-- scripts/restore | 22 +++++++++------------- scripts/upgrade | 8 +++++--- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/conf/config/collector.yaml b/conf/config/collector.yaml index dd8f451..f568d0f 100644 --- a/conf/config/collector.yaml +++ b/conf/config/collector.yaml @@ -66,10 +66,10 @@ log: level: INFO api: -# endpoint: 'https://__DOMAIN____PATH__/' endpoint: 'http://127.0.0.1:__PORT____PATH__/' # if you need to use a custom base path (for a reverse proxy), you can add a suffix to the endpoint. # See docs/TROUBLESHOOTING_REVERSE_PROXY.md for more info, +# endpoint: 'https://__DOMAIN____PATH__/' # example to show how to override the smartctl command args globally #commands: diff --git a/manifest.toml b/manifest.toml index 21d529d..1c62fae 100644 --- a/manifest.toml +++ b/manifest.toml @@ -4,7 +4,7 @@ id = "scrutiny" name = "Scrutiny" description.en = "WebUI for smartd S.M.A.R.T monitoring" -version = "0.6.0~ynh2" +version = "0.6.0~ynh3" maintainers = ["ewilly"] diff --git a/scripts/install b/scripts/install index 1b5f4e5..d10f47c 100755 --- a/scripts/install +++ b/scripts/install @@ -83,12 +83,13 @@ myynh_set_permissions ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name="influxdb" --action="enable" ynh_systemd_action --service_name="influxdb" --action="start" + +ynh_systemd_action --service_name="scrutiny-web-server.service" --action="enable" 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="enable" - 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="enable" ynh_systemd_action --service_name="scrutiny-collector.timer" --action="start" --log_path="/var/log/$app/collector.log" fi diff --git a/scripts/restore b/scripts/restore index 9e1dd5e..7665e4c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -26,16 +26,9 @@ ynh_script_progression --message="Restoring system configurations related to $ap ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/scrutiny-web-server.service" -systemctl enable "/etc/systemd/system/scrutiny-web-server.service" --quiet ynh_restore_file --origin_path="/etc/systemd/system/scrutiny-collector.service" ynh_restore_file --origin_path="/etc/systemd/system/scrutiny-collector.timer" -yunohost service add "scrutiny-web-server" --description="WebUI for smartd S.M.A.R.T monitoring" --log="/var/log/$app/web-server.log" -if [ $collector -eq 1 ] -then - yunohost service add "scrutiny-collector" --description="Collector running on timer (daily) for smartd S.M.A.R.T monitoring" --log="/var/log/$app/collector.log" --test_status="systemctl show scrutiny-collector.service -p ActiveState --value | grep -v failed" -fi - ynh_restore_file --origin_path="/etc/logrotate.d/$app" ynh_restore_file --origin_path="/var/log/$app" @@ -46,20 +39,23 @@ ynh_restore_file --origin_path="/var/log/$app" #================================================= ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 -# Typically you only have either $app or php-fpm but not both at the same time... +systemctl daemon-reload +ynh_systemd_action --service_name="nginx" --action="reload" + +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" 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="enable" - ynh_systemd_action --service_name="scrutiny-collector.service" --action="start" --log_path="/var/log/$app/collector.log" + yunohost service add "scrutiny-collector" --description="Collector running on timer (daily) for smartd S.M.A.R.T monitoring" --log="/var/log/$app/collector.log" --test_status="systemctl show scrutiny-collector.service -p ActiveState --value | grep -v failed" ynh_systemd_action --service_name="scrutiny-collector.timer" --action="enable" ynh_systemd_action --service_name="scrutiny-collector.timer" --action="start" --log_path="/var/log/$app/collector.log" fi -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index da81cdb..6f5231d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -100,14 +100,16 @@ myynh_set_permissions # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 + +systemctl daemon-reload + ynh_systemd_action --service_name="influxdb" --action="enable" ynh_systemd_action --service_name="influxdb" --action="start" + +ynh_systemd_action --service_name="scrutiny-web-server.service" --action="enable" 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="enable" - 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="enable" ynh_systemd_action --service_name="scrutiny-collector.timer" --action="start" --log_path="/var/log/$app/collector.log" fi From ac46f77549031363d401f52279fe29ae703e6ef6 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 3 Apr 2023 07:09:03 +0000 Subject: [PATCH 3/4] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cbd317b..2d1a60f 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Scrutiny is a simple but focused application, with a couple of core features: - (Future) Hard Drive performance testing & tracking -**Shipped version:** 0.6.0~ynh2 +**Shipped version:** 0.6.0~ynh3 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 4e9c238..e21024b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -35,7 +35,7 @@ Scrutiny is a simple but focused application, with a couple of core features: - (Future) Hard Drive performance testing & tracking -**Version incluse :** 0.6.0~ynh2 +**Version incluse :** 0.6.0~ynh3 ## Captures d’écran From 46b64c45d1c7c6672560b2e1ce0d9bd5bab3b58c Mon Sep 17 00:00:00 2001 From: ewilly Date: Mon, 3 Apr 2023 11:59:03 +0200 Subject: [PATCH 4/4] Fix --- scripts/change_url | 4 ++-- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) 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 ]