X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=debian%2Fgosa.postinst;h=0c45ec06ae20b05e5ec123ad078ad49ab6c6b92c;hb=1b616ca469e74bf76865bcdac3fc8aac0936b627;hp=66999d7730484de9f2dd2219219183187f878e03;hpb=e299f0ca47a924516f2afbe4e922f2418b75315c;p=gosa.git diff --git a/debian/gosa.postinst b/debian/gosa.postinst index 66999d773..0c45ec06a 100755 --- a/debian/gosa.postinst +++ b/debian/gosa.postinst @@ -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,13 +41,21 @@ chown root.$WEBGROUP -R /var/spool/gosa chmod 770 -R /var/spool/gosa # Add links for safe mode -for link in /usr/bin/convert /usr/bin/lpstat; do - [ ! -f $link ] && ln -sf $link /usr/share/gosa/bin/${link##*/} +[ ! -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##*/} + [ ! -L $target ] && ln -sf $source $target + fi 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