File debian.mailtrace-gui.postinst of Package mailtrace

#!/bin/bash
# postinstall script for the mailtrace-gui package

set -e

# enable mod rewrite for apache2
if [ -f /etc/apache2/mods-available/rewrite.load ];then
	if [ -d /etc/apache2/mods-enabled ];then
		cd /etc/apache2/mods-enabled
		[ -L rewrite.load ] || ln -s ../mods-available/rewrite.load
	else
		echo mailtrace_gui could not enable apache2 mod rewrite.
		echo Please enable it.
	fi
else
	echo mailtrace_gui needs apache2 mod rewrite, but could not find it.
	echo Please make sure you have apache2 with mod rewrite enabled.
fi

if [ -f /etc/init.d/apache2 ];then
	/etc/init.d/apache2 restart
fi

# change access rights for certains directories
chown www-data:root /opt/heinlein/mailtrace/frontend/etc
chown www-data:root /opt/heinlein/mailtrace/frontend/etc/AC
chown www-data:root /opt/heinlein/mailtrace/frontend/etc/HMT
chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache
chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache/templates
chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache/zend
chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache/updates
chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache/updates/export
chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache/updates/import
chown www-data:root /opt/heinlein/mailtrace/frontend/data/session
chown www-data:root /opt/heinlein/mailtrace/frontend/logs
openSUSE Build Service is sponsored by