Properly handle systemd start/stop during Debian package install, closes #30

This commit is contained in:
Philipp Heckel 2021-12-04 15:32:21 -05:00
parent 07a1fe3acb
commit 6fbbb0c7b5
4 changed files with 38 additions and 3 deletions

View file

@ -1,6 +1,8 @@
#!/bin/sh
set -eu
systemctl stop ntfy >/dev/null 2>&1 || true
set -e
# Delete the config if package is purged
if [ "$1" = "purge" ]; then
rm -rf /etc/ntfy
echo "Deleting /etc/ntfy ..."
rm -rf /etc/ntfy || true
fi