Skip to content
Snippets Groups Projects
Commit 15bc857c authored by Timothy Allen's avatar Timothy Allen Committed by Robin Appelman
Browse files

Add a systemd service to restart the daemon


... whenever the app is updated.

Signed-off-by: default avatarTimothy Allen <tim@treehouse.org.za>
parent 56172500
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,7 @@ content.
```ini
[Unit]
Description = Push daemon for Nextcloud clients
Documentation=https://github.com/nextcloud/notify_push
[Service]
Environment = PORT=7867 # Change if you already have something running on this port
......@@ -104,6 +105,43 @@ Every time this app receives an update you should restart the systemd service us
`sudo systemctl restart notify_push`
Alternatively, you can do this automatically via systemctl by creating the following systemd service and path:
`/etc/systemd/system/notify_push-watcher.service`
```ini
[Unit]
Description=Restart Push daemon for Nextcloud clients when it receives updates
Documentation=https://github.com/nextcloud/notify_push
Requires=notify_push.service
After=notify_push.service
StartLimitIntervalSec=10
StartLimitBurst=5
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl restart notify_push.service
[Install]
WantedBy=multi-user.target
```
`/etc/systemd/system/notify_push-watcher.path`
```ini
[Unit]
Description=Restart Push daemon for Nextcloud clients when it receives updates
Documentation=https://github.com/nextcloud/notify_push
PartOf=notify_push-watcher.service
[Path]
PathModified=/path/to/push/binary/notify_push
Unit=notify_push-watcher.service
[Install]
WantedBy=multi-user.target
```
Adjusting the path as needed.
### Reverse proxy
It is **strongly** recommended to set up the push service behind a reverse proxy, this both removes the need to open
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment