@@ -48,29 +48,51 @@ if [ ! -z "$interface" ] && [ -z "$(echo $interface |cut -s -f2 -d :)" ]; then
4848fi
4949if [ ! -z " $interface " ]; then
5050 /sbin/ifconfig $interface down
51- rm -f /etc/sysconfig/network-scripts/ifcfg-$interface
51+
52+ # Deleting startup conf on RHEL/CentOS/Fedora
53+ if [ -e " /etc/sysconfig/network-scripts/ifcfg-$interface " ]; then
54+ rm -f /etc/sysconfig/network-scripts/ifcfg-$interface
55+ fi
56+
57+ # Deleting startup conf on Debian/Ubuntu
58+ if [ -e " /etc/network/interfaces" ]; then
59+ ip_str=$( grep -n $ip $ /etc/network/interfaces | cut -f1 -d:)
60+ if [ ! -z " $ip_str " ]; then
61+ first_str=$(( ip_str - 3 ))
62+ last_str=$(( ip_str + 1 ))
63+ sed -i " $first_str ,$last_str d" /etc/network/interfaces
64+ fi
65+ fi
5266fi
5367
5468# Deleting vesta ip
5569rm -f $VESTA /data/ips/$ip
5670
57- # Disable virtual ip hosting support
58- web_conf=" /etc/$WEB_SYSTEM /conf.d/vesta.conf"
71+ # Deleting web config
5972if [ ! -z " $WEB_SYSTEM " ]; then
60- sed -i " /NameVirtualHost $ip :/d" $web_conf
61- sed -i " /Listen $ip :/d" $web_conf
73+ rm -f /etc/$WEB_SYSTEM /conf.d/$ip .conf
6274fi
6375
6476# Deleting proxy config
6577if [ ! -z " $PROXY_SYSTEM " ]; then
6678 rm -f /etc/$PROXY_SYSTEM /conf.d/$ip .conf
6779
80+ # mod_extract_forwarded
6881 fw_conf=" /etc/$WEB_SYSTEM /conf.d/mod_extract_forwarded.conf"
6982 if [ -e " $fw_conf " ]; then
7083 ips=$( grep ' MEFaccept 127.0.0.1' $fw_conf )
7184 new_ips=$( echo " $ips " | sed -e " s/$ip //" )
7285 sed -i " s/$ips /$new_ips /g" $fw_conf
7386 fi
87+
88+ # mod_rpaf
89+ rpaf_conf=" /etc/$WEB_SYSTEM /mods-enabled/rpaf.conf"
90+ if [ -e " $rpaf_conf " ]; then
91+ ips=$( grep RPAFproxy_ips $rpaf_conf )
92+ new_ips=$( echo " $rpaf_str " | sed -e " s/$ip //" )
93+ sed -i " s/$ips /$new_ips /g" $rpaf_conf
94+ fi
95+
7496fi
7597
7698
0 commit comments