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