1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

enable/disable the notify push path

This commit is contained in:
Kayou 2024-08-26 16:13:09 +02:00 committed by GitHub
parent eb7d8693aa
commit f6829db663
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 15 additions and 8 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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