浏览代码

Check if RemoteIP module is already activated

dpeca 9 年之前
父节点
当前提交
60c4b08258
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      upd/switch_rpath.sh

+ 5 - 0
upd/switch_rpath.sh

@@ -11,6 +11,11 @@ if [ ! -e "/etc/apache2/mods-available/remoteip.load" ]; then
     exit
 fi
 
+if [ -f "/etc/apache2/mods-enabled/remoteip.load" ]; then
+    echo "RemoteIP is already activated"
+    exit
+fi
+
 # Disabling rpaf
 /usr/sbin/a2dismod rpaf > /dev/null 2>&1
 rm -f /etc/apache2/mods-enabled/rpaf.conf