prerm.sh 349 B

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