prerm.sh 304 B

123456789101112
  1. #!/bin/sh
  2. set -e
  3. # Stop systemd service
  4. if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
  5. echo "Stopping ntfy.service ..."
  6. if [ -x /usr/bin/deb-systemd-invoke ]; then
  7. deb-systemd-invoke stop 'ntfy.service' >/dev/null || true
  8. else
  9. systemctl stop ntfy >/dev/null 2>&1 || true
  10. fi
  11. fi