diff options
Diffstat (limited to 'packages/debian')
-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 |