diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-03-04 21:37:09 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-03-04 21:37:09 +0000 |
commit | 9df6ca1081d10c6ccb841ab436c23c3e3a067acd (patch) | |
tree | 485fea4fad65cbfa14034a785dec271df4650f33 /debian | |
parent | 8d75b8882d7b94577cacd6c60cc56107a8549708 (diff) |
rapid-tunneling: more installation fixes
* Avoid initial sudoers lecture.
* Install apache configuration on Debian.
* Don't hide errors of useradd on rapid-tunneling/redhat (copied from deb)
* Those errors were because directory /var/lib/rapid-tunneling did not
exist.
git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6825 283159da-0705-0410-b60c-f2062b4bb6ad
Diffstat (limited to 'debian')
-rw-r--r-- | debian/TODO.Debian | 4 | ||||
-rw-r--r-- | debian/rapid-tunneling-gui.dirs | 1 | ||||
-rw-r--r-- | debian/rapid-tunneling-gui.install | 1 | ||||
-rw-r--r-- | debian/rapid-tunneling-gui.links | 1 | ||||
-rw-r--r-- | debian/rapid-tunneling-gui.postinst | 10 | ||||
-rw-r--r-- | debian/rapid-tunneling-gui.prerm | 10 | ||||
-rwxr-xr-x | debian/rules | 5 |
7 files changed, 22 insertions, 10 deletions
diff --git a/debian/TODO.Debian b/debian/TODO.Debian index 884972b..04c9fc0 100644 --- a/debian/TODO.Debian +++ b/debian/TODO.Debian @@ -9,4 +9,6 @@ to be the web root. But this means that the package will not work out of the box. Anybody who I asked seems to dismiss this issue. I don't. http://webapps-common.alioth.debian.org/draft/html/ch-httpd.html#s-httpd-register-symlinks - +* Reload the httpd after installing the GUI package for the password to take + effect. +* This password doesn't buy us much, anyway. diff --git a/debian/rapid-tunneling-gui.dirs b/debian/rapid-tunneling-gui.dirs new file mode 100644 index 0000000..eae20a9 --- /dev/null +++ b/debian/rapid-tunneling-gui.dirs @@ -0,0 +1 @@ +/etc/rapid-tunneling diff --git a/debian/rapid-tunneling-gui.install b/debian/rapid-tunneling-gui.install index 3e3d1f8..9b09d37 100644 --- a/debian/rapid-tunneling-gui.install +++ b/debian/rapid-tunneling-gui.install @@ -1,3 +1,2 @@ usr/share/rapid-tunneling/www -etc/httpd/conf.d/rapid-tunneling.conf etc/rapid-tunneling/gui.htpasswd diff --git a/debian/rapid-tunneling-gui.links b/debian/rapid-tunneling-gui.links index a39ef14..b1f383a 100644 --- a/debian/rapid-tunneling-gui.links +++ b/debian/rapid-tunneling-gui.links @@ -1 +1,2 @@ /usr/share/rapid-tunneling/www /var/www/support +/etc/rapid-tunneling/apache2-rapid-tunneling.conf /etc/apache2/conf.d/rapid-tunneling.conf diff --git a/debian/rapid-tunneling-gui.postinst b/debian/rapid-tunneling-gui.postinst index b38c572..441bead 100644 --- a/debian/rapid-tunneling-gui.postinst +++ b/debian/rapid-tunneling-gui.postinst @@ -18,13 +18,15 @@ set -e # 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" +user="asterisk" +TEXT="Defaults>$user !lecture +$user ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling +$user 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 + if ! fgrep -q "$TEXT" $SUDOERS; then echo "$TEXT" >> $SUDOERS; fi + # FIXME: reloading httpd ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/rapid-tunneling-gui.prerm b/debian/rapid-tunneling-gui.prerm index 659585b..5730c27 100644 --- a/debian/rapid-tunneling-gui.prerm +++ b/debian/rapid-tunneling-gui.prerm @@ -3,13 +3,15 @@ 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" +user="asterisk" +TEXT="Defaults>$user !lecture +$user ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling +$user 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 + fgrep -v "$TEXT" $SUDOERS > ${SUDOERS}.tmp && cp ${SUDOERS}.tmp $SUDOERS && rm ${SUDOERS}.tmp + # TODO: reload httpd? ;; esac diff --git a/debian/rules b/debian/rules index 586998e..011fbf3 100755 --- a/debian/rules +++ b/debian/rules @@ -13,6 +13,11 @@ clean:: build/rapid-tunneling-server:: cp sshd_support_debian debian/rapid-tunneling-server.sshd_support.init +install/rapid-tunneling-gui:: + # yikes, redhatism: + mv $(CURDIR)/debian/tmp/etc/httpd/conf.d/rapid-tunneling.conf \ + $(CURDIR)/debian/rapid-tunneling-gui/etc/rapid-tunneling/apache2-rapid-tunneling.conf + install/rapid-tunneling-server:: dh_installinit -p rapid-tunneling-server --name=sshd_support |