diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2024-10-31 18:12:03 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2024-11-02 18:36:54 +0100 |
commit | ce5f448d3b690649a687e93dcdcfd59efe61ed28 (patch) | |
tree | 50e5f1f9e1c759edfb0672386bb059676d3b2e60 /packages | |
parent | 2b48eb051473e240735f61f41dce1c6614ca39fd (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')
-rwxr-xr-x | packages/debian/postrm | 13 | ||||
-rwxr-xr-x | packages/debian/preinst | 17 | ||||
-rwxr-xr-x | packages/debian/prerm | 4 |
3 files changed, 21 insertions, 13 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 diff --git a/packages/debian/preinst b/packages/debian/preinst index e60ef3af3..711924022 100755 --- a/packages/debian/preinst +++ b/packages/debian/preinst @@ -5,12 +5,13 @@ adduser --system --no-create-home --shell=/bin/false --group ndpisrvd adduser --system --no-create-home --shell=/bin/false --group ndpid cat <<EOF -********************************************************************************** -* The that may want to access DPI data needs access to /run/nDPIsrvd/distributor * -* * -* To make it accessible to a user, type: * -* sudo usermod --append --groups ndpisrvd-distributor [USER] * -* * -* Please not that you might need to re-login to make changes take effect. * -********************************************************************************** +**************************************************************************** +* The user whom may want to access DPI data needs access to: * +* /run/nDPIsrvd/distributor * +* * +* To make it accessible to [USER], type: * +* sudo usermod --append --groups ndpisrvd-distributor [USER] * +* * +* Please note that you might need to re-login to make changes take effect. * +**************************************************************************** EOF diff --git a/packages/debian/prerm b/packages/debian/prerm index 6942225bd..ed637e29c 100755 --- a/packages/debian/prerm +++ b/packages/debian/prerm @@ -1,3 +1,5 @@ #!/bin/sh -systemctl stop ndpisrvd.service +if [ "$1" = "remove" -o "$1" = "purge" ]; then + systemctl stop ndpisrvd.service +fi |