File: deb-post-inst.template

package info (click to toggle)
syncthing 1.19.2~ds1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 21,484 kB
  • sloc: javascript: 36,375; sh: 1,804; xml: 1,049; makefile: 67
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