summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-03-04 21:19:24 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-03-04 21:19:24 +0000
commit8d75b8882d7b94577cacd6c60cc56107a8549708 (patch)
tree17e5bfbe61cd63cc3e7c4488d1958daaf8bf7026 /debian
parent09e9f39cabc58b666698a8d543298d22613560f2 (diff)
Adding two files that were accidentally ignored before.
git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6824 283159da-0705-0410-b60c-f2062b4bb6ad
Diffstat (limited to 'debian')
-rw-r--r--debian/rapid-tunneling-gui.postinst46
-rw-r--r--debian/rapid-tunneling-gui.prerm20
2 files changed, 66 insertions, 0 deletions
diff --git a/debian/rapid-tunneling-gui.postinst b/debian/rapid-tunneling-gui.postinst
new file mode 100644
index 0000000..b38c572
--- /dev/null
+++ b/debian/rapid-tunneling-gui.postinst
@@ -0,0 +1,46 @@
+#!/bin/sh
+# postinst script for rapid-tunneling
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+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
+ configure)
+ if ! fgrep -q "$LINE" $SUDOERS; then echo "$LINE" >> $SUDOERS; fi
+ if ! fgrep -q "$LINE2" $SUDOERS; then echo "$LINE2" >> $SUDOERS; fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
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
+
+