Properly handle systemd start/stop during Debian package install, closes #30
This commit is contained in:
12
scripts/prerm.sh
Executable file
12
scripts/prerm.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Stop systemd service
|
||||
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
|
||||
echo "Stopping ntfy.service ..."
|
||||
if [ -x /usr/bin/deb-systemd-invoke ]; then
|
||||
deb-systemd-invoke stop 'ntfy.service' >/dev/null || true
|
||||
else
|
||||
systemctl stop ntfy >/dev/null 2>&1 || true
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user