Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-26 23:39:13 +0300
committerthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-27 21:20:48 +0300
commit2589f49377588f6d0bbc143b85f6992703e10e95 (patch)
treea6b3d98982ecc5c79a1d17ebf966f9c38bdb7c27 /bin
parent1d7ce6d8cd2b46546d0259440cd8ac6022786836 (diff)
notify_push: Automatically restart notify_push on error
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ncp-update-nc17
-rw-r--r--bin/ncp/CONFIG/nc-nextcloud.sh17
2 files changed, 2 insertions, 32 deletions
diff --git a/bin/ncp-update-nc b/bin/ncp-update-nc
index 8cd85b03..60e8486f 100755
--- a/bin/ncp-update-nc
+++ b/bin/ncp-update-nc
@@ -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}" || {
diff --git a/bin/ncp/CONFIG/nc-nextcloud.sh b/bin/ncp/CONFIG/nc-nextcloud.sh
index 7bcaadb2..e131ac91 100644
--- a/bin/ncp/CONFIG/nc-nextcloud.sh
+++ b/bin/ncp/CONFIG/nc-nextcloud.sh
@@ -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