blob: d662f75c4270800896c707fa979c8f06e6a9541a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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
|