Update socat.sh

This commit is contained in:
iiiiiii1
2018-05-12 20:57:15 +08:00
committed by GitHub
parent 22ab36d2ed
commit 9c68fd4813
+1 -3
View File
@@ -78,8 +78,7 @@ start_socat(){
nohup socat -T 600 UDP4-LISTEN:${port1},reuseaddr,fork UDP4:${socatip}:${port2} >> /root/socat.log 2>&1 &
" >> /etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local
else
if [ -s /etc/rc.local ]; then
elif [ -s /etc/rc.local ]; then
sed -i '/exit/d' /etc/rc.local
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 &
@@ -123,7 +122,6 @@ start_socat(){
systemctl enable rc-local >/dev/null 2>&1
systemctl start rc-local >/dev/null 2>&1
fi
fi
get_ip
sleep 3
echo