r4:
[phpbb2-cn.git] / debian / postinst
1 #!/bin/sh
2
3 set -e
4
5 [ "$1" = "configure" ] || exit 0
6 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
7
8 if [ ! -L /etc/apache2/conf.d/phpbb2-cn.conf -a ! -f /etc/apache2/conf.d/phpbb2-cn.conf ]; then
9   ln -sf /etc/phpbb2/apache.conf /etc/apache2/conf.d/phpbb2-cn.conf
10   restart_apache2="yes"
11 fi
12
13 echo "CN: phpBB2 is at http://`hostname --fqdn`/phpbb/"
14
15 if [ "$restart_apache2" = "yes" ]; then
16   if [ -x /usr/sbin/invoke-rc.d ]; then
17     [ -x /etc/init.d/apache2 ] && invoke-rc.d apache2 restart
18   else
19     [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 restart
20  fi
21 fi