Skip to content

Commit

Permalink
# 修复 卸载时,删除防火墙端口开放规则后,没有保存防火墙的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyo authored Oct 22, 2018
1 parent 5bcdd0b commit 6a3a8cc
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions brook-pf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ Uninstall_brook(){
port=$(echo "${user_all}"|sed -n "${integer}p"|awk '{print $1}')
Del_iptables
done
Save_iptables
fi
fi
if [[ ! -z $(crontab -l | grep "brook-pf.sh monitor") ]]; then
Expand Down
1 change: 1 addition & 0 deletions brook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ Uninstall_brook(){
port=$(echo "${user_text}"|awk '{print $1}')
Del_iptables
done
Save_iptables
fi
fi
if [[ ! -z $(crontab -l | grep "brook.sh monitor") ]]; then
Expand Down
1 change: 1 addition & 0 deletions cloudt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ Uninstall_ct(){
[[ ! -z $PID ]] && kill -9 ${PID}
Read_config
Del_iptables
Save_iptables
rm -rf ${file} && rm -rf /etc/init.d/cloudt
if [[ ${release} = "centos" ]]; then
chkconfig --del cloudt
Expand Down
1 change: 1 addition & 0 deletions daze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ Uninstall(){
[[ ! -z $PID ]] && kill -9 ${PID}
Read_config
Del_iptables
Save_iptables
rm -rf ${Folder}
if [[ ${release} = "centos" ]]; then
chkconfig --del daze
Expand Down
1 change: 1 addition & 0 deletions dowsdns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ Uninstall_dowsdns(){
[[ ! -z $PID ]] && kill -9 ${PID}
Read_config
Del_iptables
Save_iptables
rm -rf ${file} && rm -rf /etc/init.d/dowsdns
if [[ ${release} = "centos" ]]; then
chkconfig --del dowsdns
Expand Down
1 change: 1 addition & 0 deletions goflyway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ Uninstall_goflyway(){
[[ ! -z $PID ]] && kill -9 ${PID}
Read_config
Del_iptables
Save_iptables
rm -rf ${Folder}
if [[ ${release} = "centos" ]]; then
chkconfig --del goflyway
Expand Down
1 change: 1 addition & 0 deletions lightsocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ Uninstall_lightsocks(){
if [[ -e ${lightsocks_conf} ]]; then
Read_config
Del_iptables
Save_iptables
rm -rf "${lightsocks_conf}"
fi
rm -rf "${file}"
Expand Down
3 changes: 2 additions & 1 deletion mtproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,9 @@ Uninstall_mtproxy(){
check_pid
[[ ! -z $PID ]] && kill -9 ${PID}
if [[ -e ${mtproxy_conf} ]]; then
port=$(cat ${mtproxy_conf}|sed -n "1p")
port=$(cat ${mtproxy_conf}|grep 'PORT = '|awk -F 'PORT = ' '{print $NF}')
Del_iptables
Save_iptables
fi
if [[ ! -z $(crontab -l | grep "mtproxy.sh monitor") ]]; then
crontab_monitor_mtproxy_cron_stop
Expand Down
1 change: 1 addition & 0 deletions pserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ Uninstall_ps(){
[[ ! -z $PID ]] && kill -9 ${PID}
port=`cat ${ps_conf}|grep "port = "|awk -F "port = " '{print $NF}'`
Del_iptables

rm -rf /usr/local/bin/node
rm -rf /usr/local/bin/npm
rm -rf ${node_file}
Expand Down
2 changes: 2 additions & 0 deletions ssr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -715,13 +715,15 @@ Uninstall_SSR(){
if [[ -z "${now_mode}" ]]; then
port=`${jq_file} '.server_port' ${config_user_file}`
Del_iptables
Save_iptables
else
user_total=`${jq_file} '.port_password' ${config_user_file} | sed '$d' | sed "1d" | wc -l`
for((integer = 1; integer <= ${user_total}; integer++))
do
port=`${jq_file} '.port_password' ${config_user_file} | sed '$d' | sed "1d" | awk -F ":" '{print $1}' | sed -n "${integer}p" | sed -r 's/.*\"(.+)\".*/\1/'`
Del_iptables
done
Save_iptables
fi
if [[ ${release} = "centos" ]]; then
chkconfig --del ssr
Expand Down
1 change: 1 addition & 0 deletions ssrmu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ Uninstall_SSR(){
port=$(echo "${user_info}"|sed -n "${integer}p"|awk '{print $4}')
Del_iptables
done
Save_iptables
fi
if [[ ! -z $(crontab -l | grep "ssrmu.sh") ]]; then
crontab_monitor_ssr_cron_stop
Expand Down
2 changes: 2 additions & 0 deletions status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@ Uninstall_ServerStatus_server(){
[[ ! -z $PID ]] && kill -9 ${PID}
Read_config_server
Del_iptables "${server_port}"
Save_iptables
if [[ -e "${client_file}/status-client.py" ]]; then
rm -rf "${server_file}"
rm -rf "${web_file}"
Expand Down Expand Up @@ -853,6 +854,7 @@ Uninstall_ServerStatus_client(){
[[ ! -z $PID ]] && kill -9 ${PID}
Read_config_client
Del_iptables_OUT "${client_port}"
Save_iptables
if [[ -e "${server_file}/sergate" ]]; then
rm -rf "${client_file}"
else
Expand Down

0 comments on commit 6a3a8cc

Please sign in to comment.