summaryrefslogtreecommitdiff
path: root/linux/deb/01-fs-hello-kamal/package/DEBIAN/postrm
blob: b18855357eb8cce603dd75b8576aa0f28809d43e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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