diff options
author | Simon Frei <freisim93@gmail.com> | 2021-04-11 20:04:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-11 20:04:15 +0200 |
commit | c2bb11a794d1a392c27d688aea791f2664d08081 (patch) | |
tree | b8674e703d0733c383ccf0dea6f3e09263f48858 /script | |
parent | 1a00ea7c6e06aecfe100c7ae4f4ad58c5e9e831b (diff) | |
download | syncthing-c2bb11a794d1a392c27d688aea791f2664d08081.tar.gz syncthing-c2bb11a794d1a392c27d688aea791f2664d08081.zip |
build: Do not use --deb-systemd with fpm (fixes #7548) (#7564)
Diffstat (limited to 'script')
-rw-r--r-- | script/deb-post-inst.template | 14 | ||||
-rw-r--r-- | script/post-upgrade | 8 |
2 files changed, 14 insertions, 8 deletions
diff --git a/script/deb-post-inst.template b/script/deb-post-inst.template new file mode 100644 index 000000000..b98d6e629 --- /dev/null +++ b/script/deb-post-inst.template @@ -0,0 +1,14 @@ +#!/bin/sh + +command -v deb-systemd-invoke > /dev/null +has_systemd=$? + +if [ $has_systemd -eq 0 ]; then + systemctl daemon-reload +fi + +if [ $has_systemd -eq 0 ] && [ -n "$(systemctl list-units --plain --no-legend {{.Service}})" ]; then + deb-systemd-invoke try-restart "{{.Service}}" +else + pkill -HUP -x {{.Command}} +fi diff --git a/script/post-upgrade b/script/post-upgrade deleted file mode 100644 index 5fb8ad187..000000000 --- a/script/post-upgrade +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if command -v deb-systemd-invoke > /dev/null; then - deb-systemd-invoke restart procps.service -else - sysctl -q --system -fi -pkill -HUP -x syncthing || true |