ntfy/scripts/postrm.sh
Nick Farrell b218e62ffc
Actually apply the pre-commit fixers to the codebase.
This can be redone manually with
`pre-commit run --all`

While the pre-commit hook could be merged to run locally,
it is much cleaner to align all the files to best-practice
syntax in a single commit. It is also required for server-side
validation.
2022-12-23 08:15:51 +11:00

9 lines
226 B
Bash
Executable file

#!/bin/sh
set -e
# Delete the config if package is purged
if [ "$1" = "purge" ] || [ "$1" = "0" ]; then
id ntfy >/dev/null 2>&1 && userdel ntfy
rm -f /etc/ntfy/server.yml /etc/ntfy/client.yml
rmdir /etc/ntfy || true
fi