diff --git a/scripts/change_url b/scripts/change_url index fbf2ec3..ff2e8eb 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -74,8 +74,9 @@ then esac ynh_add_systemd_config --service="${app}-notify-push" - ynh_add_systemd_config --service="${app}-notify-push-watcher" --template="watcher.service" ynh_add_config --template="watcher.path" --destination="/etc/systemd/system/${app}-notify-push-watcher.path" + ynh_add_systemd_config --service="${app}-notify-push-watcher" --template="watcher.service" + systemctl enable --now ${app}-notify-push-watcher.path ynh_exec_as "$app" php${phpversion} --define apc.enable_cli=1 $install_dir/cron.php diff --git a/scripts/config b/scripts/config index 83843a3..87b39b6 100644 --- a/scripts/config +++ b/scripts/config @@ -105,8 +105,9 @@ set__enable_notify_push() { fi ynh_remove_systemd_config --service="${app}-notify-push" - ynh_remove_systemd_config --service="${app}-notify-push-watcher" + systemctl disable --now "${app}-notify-push-watcher.path" ynh_secure_remove --file="/etc/systemd/system/${app}-notify-push-watcher.path" + ynh_remove_systemd_config --service="${app}-notify-push-watcher" ynh_print_info "Notify push disabled" elif [ "$enable_notify_push" -eq "1" ]; then @@ -136,8 +137,9 @@ set__enable_notify_push() { esac ynh_add_systemd_config --service="${app}-notify-push" - ynh_add_systemd_config --service="${app}-notify-push-watcher" --template="watcher.service" ynh_add_config --template="watcher.path" --destination="/etc/systemd/system/${app}-notify-push-watcher.path" + ynh_add_systemd_config --service="${app}-notify-push-watcher" --template="watcher.service" + systemctl enable --now ${app}-notify-push-watcher.path exec_occ background:cron diff --git a/scripts/install b/scripts/install index 5952e50..df1d192 100755 --- a/scripts/install +++ b/scripts/install @@ -222,8 +222,9 @@ then esac ynh_add_systemd_config --service="${app}-notify-push" - ynh_add_systemd_config --service="${app}-notify-push-watcher" --template="watcher.service" ynh_add_config --template="watcher.path" --destination="/etc/systemd/system/${app}-notify-push-watcher.path" + ynh_add_systemd_config --service="${app}-notify-push-watcher" --template="watcher.service" + systemctl enable --now ${app}-notify-push-watcher.path fi #================================================= diff --git a/scripts/remove b/scripts/remove index 33e288a..0da35fc 100755 --- a/scripts/remove +++ b/scripts/remove @@ -25,8 +25,9 @@ ynh_remove_fail2ban_config # Remove notify push ynh_remove_systemd_config --service="${app}-notify-push" -ynh_remove_systemd_config --service="${app}-notify-push-watcher" +systemctl disable --now ${app}-notify-push-watcher.path ynh_secure_remove --file="/etc/systemd/system/${app}-notify-push-watcher.path" +ynh_remove_systemd_config --service="${app}-notify-push-watcher" ynh_secure_remove --file="/var/run/$app" # Remove a cron file diff --git a/scripts/restore b/scripts/restore index 5910e4c..e93d20d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -137,8 +137,9 @@ then ynh_restore_file --origin_path="/etc/systemd/system/${app}-notify-push-watcher.service" ynh_restore_file --origin_path="/etc/systemd/system/${app}-notify-push-watcher.path" - systemctl enable "${app}-notify-push".service --quiet - systemctl enable "${app}-notify-push-watcher".service --quiet + systemctl enable --now "${app}-notify-push".service --quiet + systemctl enable --now "${app}-notify-push-watcher".service --quiet + systemctl enable --now "${app}-notify-push-watcher".path --quiet fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 0ec378a..8d71ef4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -407,8 +407,9 @@ then esac ynh_add_systemd_config --service="${app}-notify-push" - ynh_add_systemd_config --service="${app}-notify-push-watcher" --template="watcher.service" ynh_add_config --template="watcher.path" --destination="/etc/systemd/system/${app}-notify-push-watcher.path" + ynh_add_systemd_config --service="${app}-notify-push-watcher" --template="watcher.service" + systemctl enable --now ${app}-notify-push-watcher.path fi