summaryrefslogtreecommitdiff
path: root/microservices/02-api-gateway/linux/deb/package/DEBIAN/postrm
diff options
context:
space:
mode:
authorKamal Wickramanayake <kamal@inbox.lk>2026-07-03 21:10:32 +0530
committerKamal Wickramanayake <kamal@inbox.lk>2026-07-03 21:10:32 +0530
commita0f3f5a069153c46ac3a85fa75c3ec50fea6ea99 (patch)
tree6e97c9b87c314a8a64a25d3ffe10e710db1740fc /microservices/02-api-gateway/linux/deb/package/DEBIAN/postrm
parentaa122113ade36f02dc8fdbebdf1232b5c4b8742c (diff)
Added Linux deb file creation scripts and build-all.sh
Diffstat (limited to 'microservices/02-api-gateway/linux/deb/package/DEBIAN/postrm')
-rwxr-xr-xmicroservices/02-api-gateway/linux/deb/package/DEBIAN/postrm14
1 files changed, 14 insertions, 0 deletions
diff --git a/microservices/02-api-gateway/linux/deb/package/DEBIAN/postrm b/microservices/02-api-gateway/linux/deb/package/DEBIAN/postrm
new file mode 100755
index 0000000..c2d202c
--- /dev/null
+++ b/microservices/02-api-gateway/linux/deb/package/DEBIAN/postrm
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -e
+
+# Check if the package is being purged (erased entirely including configs)
+if [ -z "$DPKG_ROOT" ] && [ "$1" = "purge" ] ; then
+ update-rc.d ceit-fs-api-gateway remove >/dev/null
+ deluser --quiet ceit-fs-api-gateway || true
+fi
+
+# Reload systemd service configuration files.
+systemctl daemon-reload
+
+# postrm script must exit with 0
+exit 0