From 9cea580706d854d2492575a3c12af3c00c3d6dec Mon Sep 17 00:00:00 2001 From: iiiiiii1 <25471406+iiiiiii1@users.noreply.github.com> Date: Fri, 18 May 2018 22:21:15 +0800 Subject: [PATCH] Update socat.sh --- socat.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/socat.sh b/socat.sh index 7cc76c7..47728c3 100644 --- a/socat.sh +++ b/socat.sh @@ -86,7 +86,7 @@ start_socat(){ chmod +x /etc/rc.local else echo -e "${Green}检测到系统无rc.local自启,正在为其配置... ${Font} " - echo "[Unit] +echo "[Unit] Description=/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 & nohup socat -T 600 UDP4-LISTEN:${port1},reuseaddr,fork UDP4:${socatip}:${port2} >> /root/socat.log 2>&1 & " >> /etc/rc.local -chmod +x /etc/rc.local -systemctl enable rc-local >/dev/null 2>&1 -systemctl start rc-local >/dev/null 2>&1 + chmod +x /etc/rc.local + systemctl enable rc-local >/dev/null 2>&1 + systemctl start rc-local >/dev/null 2>&1 fi get_ip sleep 3