deb-post-inst.template 328 B

123456789101112131415
  1. #!/bin/sh
  2. command -v deb-systemd-invoke > /dev/null
  3. has_systemd=$?
  4. if [ $has_systemd -eq 0 ]; then
  5. systemctl daemon-reload
  6. fi
  7. if [ $has_systemd -eq 0 ] && [ -n "$(systemctl list-units --plain --no-legend {{.Service}})" ]; then
  8. deb-systemd-invoke try-restart "{{.Service}}"
  9. else
  10. pkill -HUP -x {{.Command}} || :
  11. fi