mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
notify_push: Automatically restart notify_push on error
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
1d7ce6d8cd
commit
2589f49377
@ -206,22 +206,7 @@ else
|
||||
apachectl -k graceful
|
||||
## make sure the notify_push daemon is runnnig
|
||||
|
||||
cat > /etc/systemd/system/notify_push.service <<EOF
|
||||
[Unit]
|
||||
Description = Push daemon for Nextcloud clients
|
||||
After=mysql.service
|
||||
After=redis.service
|
||||
Requires=redis.service
|
||||
|
||||
[Service]
|
||||
Environment=PORT=7867
|
||||
Environment=NEXTCLOUD_URL=https://localhost
|
||||
ExecStart="/var/www/nextcloud/apps/notify_push/bin/${ARCH}/notify_push" --allow-self-signed /var/www/nextcloud/config/config.php
|
||||
User=www-data
|
||||
|
||||
[Install]
|
||||
WantedBy = multi-user.target
|
||||
EOF
|
||||
install_template systemd/notify_push.service.sh /etc/systemd/system/notify_push.service
|
||||
start_notify_push
|
||||
nc_domain="$(ncc config:system:get overwrite.cli.url)"
|
||||
set-nc-domain "${nc_domain}" || {
|
||||
|
||||
@ -226,22 +226,7 @@ EOF
|
||||
|
||||
arch="$(uname -m)"
|
||||
[[ "${arch}" =~ "armv7" ]] && arch="armv7"
|
||||
cat > /etc/systemd/system/notify_push.service <<EOF
|
||||
[Unit]
|
||||
Description = Push daemon for Nextcloud clients
|
||||
After=mysql.service
|
||||
After=redis.service
|
||||
Requires=redis.service
|
||||
|
||||
[Service]
|
||||
Environment=PORT=7867
|
||||
Environment=NEXTCLOUD_URL=https://localhost
|
||||
ExecStart=/var/www/nextcloud/apps/notify_push/bin/"${arch}"/notify_push --allow-self-signed /var/www/nextcloud/config/config.php
|
||||
User=www-data
|
||||
|
||||
[Install]
|
||||
WantedBy = multi-user.target
|
||||
EOF
|
||||
install_template systemd/notify_push.service.sh /etc/systemd/system/notify_push.service
|
||||
[[ -f /.docker-image ]] || systemctl enable notify_push
|
||||
|
||||
# some added security
|
||||
|
||||
23
etc/ncp-templates/systemd/notify_push.service.sh
Normal file
23
etc/ncp-templates/systemd/notify_push.service.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#! /bin/bash
|
||||
|
||||
set -e
|
||||
source /usr/local/etc/library.sh
|
||||
|
||||
cat <<EOF
|
||||
[Unit]
|
||||
Description = Push daemon for Nextcloud clients
|
||||
After=mysql.service
|
||||
After=redis.service
|
||||
Requires=redis.service
|
||||
|
||||
[Service]
|
||||
Environment=PORT=7867
|
||||
Environment=NEXTCLOUD_URL=https://localhost
|
||||
ExecStart="/var/www/nextcloud/apps/notify_push/bin/${ARCH}/notify_push" --allow-self-signed /var/www/nextcloud/config/config.php
|
||||
User=www-data
|
||||
Restart=on-failure
|
||||
RestartSec=20
|
||||
|
||||
[Install]
|
||||
WantedBy = multi-user.target
|
||||
EOF
|
||||
@ -175,6 +175,8 @@ fi
|
||||
# update to the latest NC version
|
||||
is_active_app nc-autoupdate-nc && run_app nc-autoupdate-nc
|
||||
|
||||
start_notify_push
|
||||
|
||||
# Refresh ncp config values
|
||||
source /usr/local/etc/library.sh
|
||||
|
||||
|
||||
6
updates/1.50.1.sh
Normal file
6
updates/1.50.1.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
source /usr/local/etc/library.sh
|
||||
|
||||
install_template systemd/notify_push.service.sh /etc/systemd/system/notify_push.service
|
||||
Loading…
x
Reference in New Issue
Block a user