aboutsummaryrefslogtreecommitdiff
path: root/packages/debian/postrm
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2024-10-31 18:12:03 +0100
committerToni Uhlig <matzeton@googlemail.com>2024-11-02 18:36:54 +0100
commitce5f448d3b690649a687e93dcdcfd59efe61ed28 (patch)
tree50e5f1f9e1c759edfb0672386bb059676d3b2e60 /packages/debian/postrm
parent2b48eb051473e240735f61f41dce1c6614ca39fd (diff)
Switched OpenWrt GitHub Actions SDK to main branch
* fixed some SonarCloud complaints * added more systemd CI tests * fixed debian package scripts to obey remove/purge * changed `chmod_chown()` error handling Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'packages/debian/postrm')
-rwxr-xr-xpackages/debian/postrm13
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/debian/postrm b/packages/debian/postrm
index 0699f2a47..4d2d8c5c0 100755
--- a/packages/debian/postrm
+++ b/packages/debian/postrm
@@ -1,6 +1,11 @@
#!/bin/sh
-rm -rf /run/nDPId /run/nDPIsrvd
-deluser ndpid || true
-deluser ndpisrvd || true
-delgroup ndpisrvd-distributor || true
+if [ "$1" = "remove" -o "$1" = "purge" ]; then
+ rm -rf /run/nDPId /run/nDPIsrvd
+
+ if [ "$1" = "purge" ]; then
+ deluser ndpid || true
+ deluser ndpisrvd || true
+ delgroup ndpisrvd-distributor || true
+ fi
+fi