Code

Added debconf information
[gosa.git] / debian / gosa.postinst
index b9c18e66bce011b10e3f8a4417be3c30010b3956..0c45ec06ae20b05e5ec123ad078ad49ab6c6b92c 100755 (executable)
@@ -1,6 +1,8 @@
 #! /bin/sh
 # GOsa postinst script
 
+#DEBHELPER#
+
 # We exit unless the package is being configured
 case "$1" in
         abort*upgrade)         exit 0;;
@@ -39,6 +41,7 @@ chown root.$WEBGROUP -R /var/spool/gosa
 chmod 770 -R /var/spool/gosa
 
 # Add links for safe mode
+[ ! -d /usr/share/gosa/bin ] && mkdir -p /usr/share/gosa/bin
 for source in /usr/bin/convert /usr/bin/lpstat; do
        if [ -e $source ]; then
                target=/usr/share/gosa/bin/${source##*/}
@@ -48,7 +51,11 @@ done
 
 # Finally restart servers
 for server in $servers; do
-       /etc/init.d/$server reload || /bin/true
+       if [ -x /usr/sbin/invoke-rc.d ]; then
+               invoke-rc.d $server restart
+       else
+               /etc/init.d/$server restart
+       fi
 done
 
 exit 0