This is an automated email from the git hooks/post-receive script.

steinm-guest pushed a commit to branch master
in repository routino.

commit e9edc1c1e811c88a6a103b12975ccef5b6d3b828
Author: Uwe Steinmann <ste...@debian.org>
Date:   Thu Apr 17 13:03:34 2014 +0200

    install apache, freedesktop, avahi config
---
 debian/routino-www.postinst | 50 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/debian/routino-www.postinst b/debian/routino-www.postinst
index a2e9ef0..e5486a4 100644
--- a/debian/routino-www.postinst
+++ b/debian/routino-www.postinst
@@ -7,6 +7,33 @@ if [ "$DPKG_DEBUG" = "developer" ]; then
        set -x
 fi
 
+avahi_install() {
+       if [ -d /etc/avahi/services/ -a ! -e 
/etc/avahi/services/routino-www.service -a ! -L 
/etc/avahi/services/routino-www.service ] ; then
+               ln -s ../../routino-www/routino-www.service /etc/avahi/services/
+       fi
+}
+
+desktop_install() {
+       if [ -d /usr/share/applications/ -a ! -e 
/usr/share/applications/routino-www.desktop -a ! -L 
/usr/share/applications/routino-www.desktop ] ; then
+               ln -s /etc/routino-www/routino-www.desktop 
/usr/share/applications/
+       fi
+}
+
+apache_install() {
+       mkdir -p /etc/apache2/conf-available
+       ln -sf ../../routino-www/apache.conf 
/etc/apache2/conf-available/routino-www.conf
+       
+       COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 
2>/dev/null | awk '{print $3}' || true)
+
+       if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+               . /usr/share/apache2/apache2-maintscript-helper
+               apache2_invoke enconf routino-www
+       elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = 
"unpacked" ] ; then
+               [ -d /etc/apache2/conf.d/ ] && [ ! -L 
/etc/apache2/conf.d/routino-www.conf ] && ln -s 
../conf-available/routino-www.conf /etc/apache2/conf.d/routino-www.conf
+       fi
+
+}
+
 case "$1" in
        configure)
                if [ ! -d "/var/lib/routino/data" ] ; then
@@ -17,6 +44,29 @@ case "$1" in
                fi
                chown -R www-data:www-data /var/lib/routino/results
 
+               webservers="apache2"
+
+               for webserver in $webservers; do
+                       webserver=${webserver%,}
+                       if [ "$webserver" = "lighttpd" ] ; then
+                               lighttpd_install
+                       else
+                               apache_install $1
+                       fi
+                       # Reload webserver in any case, configuration might 
have changed
+                       # Redirection of 3 is needed because Debconf uses it 
and it might 
+                       # be inherited by webserver. See bug #446324.
+                                       if [ -f /etc/init.d/$webserver ] ; then
+                                                       if [ -x 
/usr/sbin/invoke-rc.d ]; then
+                                                                       
invoke-rc.d $webserver reload 3>/dev/null || true
+                                                       else
+                                                                       
/etc/init.d/$webserver reload 3>/dev/null || true
+                                                       fi
+                                       fi
+               done
+
+               avahi_install
+               desktop_install
        ;;
 
        abort-upgrade|abort-remove|abort-deconfigure)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/routino.git

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to