build: Do not use --deb-systemd with fpm (fixes #7548) (#7564)

This commit is contained in:
Simon Frei
2021-04-11 20:04:15 +02:00
committed by GitHub
parent 1a00ea7c6e
commit c2bb11a794
3 changed files with 48 additions and 22 deletions
+14
View File
@@ -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
-8
View File
@@ -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