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

fix systemd_action

This commit is contained in:
Salamandar 2024-05-25 22:27:44 +02:00
parent 4bfd79488f
commit a8fe840518
2 changed files with 3 additions and 3 deletions

View file

@ -67,9 +67,9 @@ ynh_script_progression --message="Adding system configurations related to $app..
for suffix in "${systemd_services_suffixes[@]}"; do
ynh_add_systemd_config --service="$app$suffix" --template="systemd$suffix.service"
_ynh_add_config_j2 --template="systemd$suffix.timer.j2" --destination="/etc/systemd/system/$app$suffix.timer"
ynh_systemd_action --service="${app}$suffix.service" --action="disable"
ynh_systemd_action --service_name="${app}$suffix.service" --action="disable"
systemctl enable --quiet "${app}$suffix.timer"
ynh_systemd_action --service="${app}$suffix.timer" --action="start"
ynh_systemd_action --service_name="${app}$suffix.timer" --action="start"
yunohost service add "$app$suffix" --description="Restic backup program ($app$suffix)" \
--test_status="systemctl show $app$suffix.service -p ActiveState --value | grep -v failed"

View file

@ -51,7 +51,7 @@ for suffix in "${systemd_services_suffixes[@]}"; do
ynh_restore_file --origin_path="/etc/systemd/system/$app$suffix.timer"
ynh_restore_file --origin_path="/etc/systemd/system/$app$suffix.service"
systemctl enable --quiet "$app$suffix.timer"
ynh_systemd_action --service="$app$suffix.timer" --action="start"
ynh_systemd_action --service_name="$app$suffix.timer" --action="start"
yunohost service add "$app$suffix" --description="Restic backup program ($app$suffix)" \
--test_status="systemctl show $app$suffix.service -p ActiveState --value | grep -v failed"