summaryrefslogtreecommitdiff
path: root/linux/deb/01-fs-hello-kamal
diff options
context:
space:
mode:
Diffstat (limited to 'linux/deb/01-fs-hello-kamal')
-rwxr-xr-xlinux/deb/01-fs-hello-kamal/package/DEBIAN/postrm18
-rwxr-xr-xlinux/deb/01-fs-hello-kamal/package/DEBIAN/prerm9
2 files changed, 27 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
+
diff --git a/linux/deb/01-fs-hello-kamal/package/DEBIAN/prerm b/linux/deb/01-fs-hello-kamal/package/DEBIAN/prerm
new file mode 100755
index 0000000..95ede71
--- /dev/null
+++ b/linux/deb/01-fs-hello-kamal/package/DEBIAN/prerm
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+
+# Stop associated services before files are removed
+# ...
+
+# prerm script must exit with 0
+exit 0
+