#!/bin/sh # postinst script for gosa # # see: dh_installdeb(1) set -e case "$1" in configure) ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# # Set ID's WEBUSER="www-data" WEBGROUP="www-data" # Create empty inclusion file for apache if [ ! -f /etc/gosa/gosa.secrets ]; then touch /etc/gosa/gosa.secrets chmod 600 /etc/gosa/gosa.secrets fi # Copy GOsa configuration to conf.d directories if [ ! -f /etc/apache2/conf.d/gosa.conf ]; then echo "Making /gosa available in /etc/apache2/conf.d" # Add GOsa include file ln -s /etc/gosa/apache-gosa.conf /etc/apache2/conf.d/gosa.conf fi # 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##*/} [ ! -L $target ] && ln -sf $source $target fi done # Fix permission in /var/spool/gosa chown root.$WEBGROUP -R /var/spool/gosa chmod 770 -R /var/spool/gosa # Add support for RequestHeader a2enmod headers # Update gosa /usr/sbin/update-gosa # Finally restart servers if [ -x /usr/sbin/invoke-rc.d ]; then invoke-rc.d apache2 reload else /etc/init.d/apache2 reload fi exit 0