diff options
Diffstat (limited to 'linux/deb/01-fs-hello-kamal/package/DEBIAN/postrm')
| -rwxr-xr-x | linux/deb/01-fs-hello-kamal/package/DEBIAN/postrm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/linux/deb/01-fs-hello-kamal/package/DEBIAN/postrm b/linux/deb/01-fs-hello-kamal/package/DEBIAN/postrm new file mode 100755 index 0000000..b188553 --- /dev/null +++ b/linux/deb/01-fs-hello-kamal/package/DEBIAN/postrm @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +# Check if the package is being purged (erased entirely including configs) +if [ "$1" = "purge" ]; then + # Delete configuration files, logs, or created users + # rm -rf /var/log/your_package/ + #deluser --quiet your_user || true +fi + +# Run ldconfig if your package installs shared libraries +if [ "$1" = "remove" ] || [ "$1" = "upgrade" ]; then + # ldconfig +fi + +# postrm script must exit with 0 +exit 0 + |
