Update socat.sh
parent
76fb6d8b40
commit
9cea580706
8
socat.sh
8
socat.sh
|
@ -86,7 +86,7 @@ start_socat(){
|
||||||
chmod +x /etc/rc.local
|
chmod +x /etc/rc.local
|
||||||
else
|
else
|
||||||
echo -e "${Green}检测到系统无rc.local自启,正在为其配置... ${Font} "
|
echo -e "${Green}检测到系统无rc.local自启,正在为其配置... ${Font} "
|
||||||
echo "[Unit]
|
echo "[Unit]
|
||||||
Description=/etc/rc.local
|
Description=/etc/rc.local
|
||||||
ConditionPathExists=/etc/rc.local
|
ConditionPathExists=/etc/rc.local
|
||||||
|
|
||||||
|
@ -117,9 +117,9 @@ echo "#!/bin/sh -e
|
||||||
echo "nohup socat TCP4-LISTEN:${port1},reuseaddr,fork TCP4:${socatip}:${port2} >> /root/socat.log 2>&1 &
|
echo "nohup socat TCP4-LISTEN:${port1},reuseaddr,fork TCP4:${socatip}:${port2} >> /root/socat.log 2>&1 &
|
||||||
nohup socat -T 600 UDP4-LISTEN:${port1},reuseaddr,fork UDP4:${socatip}:${port2} >> /root/socat.log 2>&1 &
|
nohup socat -T 600 UDP4-LISTEN:${port1},reuseaddr,fork UDP4:${socatip}:${port2} >> /root/socat.log 2>&1 &
|
||||||
" >> /etc/rc.local
|
" >> /etc/rc.local
|
||||||
chmod +x /etc/rc.local
|
chmod +x /etc/rc.local
|
||||||
systemctl enable rc-local >/dev/null 2>&1
|
systemctl enable rc-local >/dev/null 2>&1
|
||||||
systemctl start rc-local >/dev/null 2>&1
|
systemctl start rc-local >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
get_ip
|
get_ip
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
Loading…
Reference in New Issue