- cp-update -r squirrelmail-cn /etc/squirrelmail/apache.conf
-
- if [ -f /etc/apache2/conf.d/squirrelmail-cn.conf ]; then
- rm -f /etc/apache2/conf.d/squirrelmail-cn.conf
- fi
-
- # Restart Apache2 web server.
- #
- if [ -x "/etc/init.d/apache2" ]; then
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d apache2 force-reload || exit $?
- else
- /etc/init.d/apache2 force-reload || exit $?
- fi
- fi
-
- break
- ;;
+ cp-update -r squirrelmail-cn /etc/squirrelmail/apache.conf
+
+ if [ -f /etc/apache2/conf.d/squirrelmail-cn.conf ]; then
+ rm -f /etc/apache2/conf.d/squirrelmail-cn.conf
+ fi
+
+ # Restart Apache2 web server.
+ #
+ if apache2ctl configtest 2>/dev/null; then
+ invoke-rc.d apache2 force-reload || true
+ else
+ echo "CN: Your Apache2 configuration is either broken or nonexistant."
+ fi
+
+ break
+ ;;