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:
parent
eb7d8693aa
commit
f6829db663
6 changed files with 15 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue