mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Fix notify_push after reboot/restart the service, create the folder /var/run/nextcloud via systemd
This commit is contained in:
parent
aca04bd274
commit
19ae3b021f
6 changed files with 1 additions and 13 deletions
|
@ -4,6 +4,7 @@ Description = Push daemon for Nextcloud clients
|
||||||
[Service]
|
[Service]
|
||||||
Environment=SOCKET_PATH=/var/run/__APP__/notify-push.sock
|
Environment=SOCKET_PATH=/var/run/__APP__/notify-push.sock
|
||||||
Environment=ALLOW_SELF_SIGNED=true
|
Environment=ALLOW_SELF_SIGNED=true
|
||||||
|
RuntimeDirectory=__APP__
|
||||||
ExecStart=__INSTALL_DIR__/apps/notify_push/bin/__ARCH__/notify_push __INSTALL_DIR__/config/config.php
|
ExecStart=__INSTALL_DIR__/apps/notify_push/bin/__ARCH__/notify_push __INSTALL_DIR__/config/config.php
|
||||||
Type=notify
|
Type=notify
|
||||||
User=__APP__
|
User=__APP__
|
||||||
|
|
|
@ -127,9 +127,6 @@ set__enable_notify_push() {
|
||||||
fi
|
fi
|
||||||
exec_occ config:app:set notify_push base_endpoint --value https://$domain${path_url%/}/push
|
exec_occ config:app:set notify_push base_endpoint --value https://$domain${path_url%/}/push
|
||||||
|
|
||||||
mkdir -p /var/run/$app/
|
|
||||||
chown $app: /var/run/$app/
|
|
||||||
|
|
||||||
case $YNH_ARCH in
|
case $YNH_ARCH in
|
||||||
amd64) arch="x86_64";;
|
amd64) arch="x86_64";;
|
||||||
arm64) arch="aarch64";;
|
arm64) arch="aarch64";;
|
||||||
|
|
|
@ -212,9 +212,6 @@ then
|
||||||
exec_occ app:install notify_push
|
exec_occ app:install notify_push
|
||||||
exec_occ config:app:set notify_push base_endpoint --value https://$domain${path_url%/}/push
|
exec_occ config:app:set notify_push base_endpoint --value https://$domain${path_url%/}/push
|
||||||
|
|
||||||
mkdir -p /var/run/$app/
|
|
||||||
chown $app: /var/run/$app/
|
|
||||||
|
|
||||||
case $YNH_ARCH in
|
case $YNH_ARCH in
|
||||||
amd64) arch="x86_64";;
|
amd64) arch="x86_64";;
|
||||||
arm64) arch="aarch64";;
|
arm64) arch="aarch64";;
|
||||||
|
|
|
@ -28,7 +28,6 @@ ynh_remove_systemd_config --service="${app}-notify-push"
|
||||||
ynh_exec_warn_less systemctl disable --now ${app}-notify-push-watcher.path
|
ynh_exec_warn_less systemctl disable --now ${app}-notify-push-watcher.path
|
||||||
ynh_secure_remove --file="/etc/systemd/system/${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_remove_systemd_config --service="${app}-notify-push-watcher"
|
||||||
ynh_secure_remove --file="/var/run/$app"
|
|
||||||
|
|
||||||
# Remove a cron file
|
# Remove a cron file
|
||||||
# TODO: Ensure that cron job is not running (How !?)
|
# TODO: Ensure that cron job is not running (How !?)
|
||||||
|
|
|
@ -130,9 +130,6 @@ ynh_systemd_action --action=restart --service_name=fail2ban
|
||||||
|
|
||||||
if [ $enable_notify_push -eq 1 ]
|
if [ $enable_notify_push -eq 1 ]
|
||||||
then
|
then
|
||||||
mkdir -p /var/run/$app/
|
|
||||||
chown $app: /var/run/$app/
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/systemd/system/${app}-notify-push.service"
|
ynh_restore_file --origin_path="/etc/systemd/system/${app}-notify-push.service"
|
||||||
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.service"
|
||||||
ynh_restore_file --origin_path="/etc/systemd/system/${app}-notify-push-watcher.path"
|
ynh_restore_file --origin_path="/etc/systemd/system/${app}-notify-push-watcher.path"
|
||||||
|
|
|
@ -397,9 +397,6 @@ then
|
||||||
fi
|
fi
|
||||||
exec_occ config:app:set notify_push base_endpoint --value https://$domain${path_url%/}/push
|
exec_occ config:app:set notify_push base_endpoint --value https://$domain${path_url%/}/push
|
||||||
|
|
||||||
mkdir -p /var/run/$app/
|
|
||||||
chown $app: /var/run/$app/
|
|
||||||
|
|
||||||
case $YNH_ARCH in
|
case $YNH_ARCH in
|
||||||
amd64) arch="x86_64";;
|
amd64) arch="x86_64";;
|
||||||
arm64) arch="aarch64";;
|
arm64) arch="aarch64";;
|
||||||
|
|
Loading…
Add table
Reference in a new issue