# 2 - file exists, but it is not tagged
#
chk_conf_tag () {
-
- local conf_file
- conf_file="$1"
- RET=1
-
- if [ -f "$conf_file" ]; then
- if egrep -q "^## Begin - Generated by CARNet package mod-security-cn$" "$conf_file"; then
- RET=0
- else
- RET=2
- fi
+ local conf_file
+ conf_file="$1"
+ RET=1
+
+ if [ -f "$conf_file" ]; then
+ if egrep -q "^## Begin - Generated by CARNet package mod-security-cn$" "$conf_file"; then
+ RET=0
+ else
+ RET=2
fi
+ fi
}
done
# Restart Apache2 web server.
- if [ $need_restart -eq 1 ]; then
+ if [ $need_restart -eq 1 ]; then
if apache2ctl configtest 2>/dev/null; then
-
- # 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 restart || true
- else
- /etc/init.d/apache2 restart || true
- fi
- fi
+ invoke-rc.d apache2 force-reload || true
else
# Something is broken.
cp_echo "CN: Your Apache2 configuration seem to be broken."
;;
esac
+#DEBHELPER#
+
exit 0