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