Properly handle systemd start/stop during Debian package install, closes #30
This commit is contained in:
parent
07a1fe3acb
commit
6fbbb0c7b5
4 changed files with 38 additions and 3 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue