1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/scrutiny_ynh.git synced 2024-09-03 20:16:24 +02:00

Merge pull request #3 from YunoHost-Apps/testing

Testing
This commit is contained in:
ewilly 2023-04-03 14:58:15 +02:00 committed by GitHub
commit a32f0fa05a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 26 additions and 27 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -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"]

View file

@ -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

View file

@ -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 ]
@ -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

View file

@ -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" --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 ]
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
#=================================================

View file

@ -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 ]
@ -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