summaryrefslogtreecommitdiff
path: root/debian/rapid-tunneling-gui.prerm
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rapid-tunneling-gui.prerm')
-rw-r--r--debian/rapid-tunneling-gui.prerm20
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/rapid-tunneling-gui.prerm b/debian/rapid-tunneling-gui.prerm
new file mode 100644
index 0000000..659585b
--- /dev/null
+++ b/debian/rapid-tunneling-gui.prerm
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+SUDOERS=/etc/sudoers
+LINE="www-data ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling"
+LINE2="www-data ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling-status"
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ fgrep -v "$LINE" $SUDOERS > ${SUDOERS}.tmp && cp ${SUDOERS}.tmp $SUDOERS && rm ${SUDOERS}.tmp
+ fgrep -v "$LINE2" $SUDOERS > ${SUDOERS}.tmp && cp ${SUDOERS}.tmp $SUDOERS && rm ${SUDOERS}.tmp
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+