Update socat.sh
parent
22ab36d2ed
commit
9c68fd4813
4
socat.sh
4
socat.sh
|
@ -78,8 +78,7 @@ start_socat(){
|
||||||
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.d/rc.local
|
" >> /etc/rc.d/rc.local
|
||||||
chmod +x /etc/rc.d/rc.local
|
chmod +x /etc/rc.d/rc.local
|
||||||
else
|
elif [ -s /etc/rc.local ]; then
|
||||||
if [ -s /etc/rc.local ]; then
|
|
||||||
sed -i '/exit/d' /etc/rc.local
|
sed -i '/exit/d' /etc/rc.local
|
||||||
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 &
|
||||||
|
@ -123,7 +122,6 @@ start_socat(){
|
||||||
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
|
||||||
fi
|
|
||||||
get_ip
|
get_ip
|
||||||
sleep 3
|
sleep 3
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in New Issue