File: deb-post-inst.template

package info (click to toggle)
syncthing 1.29.5~ds1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 22,848 kB
  • sloc: javascript: 37,288; sh: 1,838; xml: 1,115; makefile: 66
file content (14 lines) | stat: -rw-r--r-- 328 bytes parent folder | download | duplicates (3)
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