Update socat.sh

This commit is contained in:
iiiiiii1
2018-05-11 20:12:12 +08:00
committed by GitHub
parent 9a55c06d0d
commit d5fc2705c5
+2 -2
View File
@@ -65,9 +65,9 @@ start_socat(){
else else
source /etc/os-release &>/dev/null source /etc/os-release &>/dev/null
if [[ "${ID}" == "debian" && ${VERSION_ID} -ge 9 ]];then if [[ "${ID}" == "debian" && ${VERSION_ID} -ge 9 ]];then
echo -e "${Green}检测到【Debian ${VERSION_ID}】无/etc/rc.local自启,正在为其配置... ${Font} " echo -e "${Green}检测到【Debian ${VERSION_ID}】无/etc/rc.local自启,正在为其配置... ${Font} " >/dev/null 2>&1
elif [[ "${ID}" == "ubuntu" && `echo "${VERSION_ID}" | cut -d '.' -f1` -ge 17 ]];then elif [[ "${ID}" == "ubuntu" && `echo "${VERSION_ID}" | cut -d '.' -f1` -ge 17 ]];then
echo -e "${Green}检测到【Ubuntu ${VERSION_ID}】无/etc/rc.local自启,正在为其配置... ${Font} " echo -e "${Green}检测到【Ubuntu ${VERSION_ID}】无/etc/rc.local自启,正在为其配置... ${Font} " >/dev/null 2>&1
echo "[Unit] echo "[Unit]
Description=/etc/rc.local Description=/etc/rc.local
ConditionPathExists=/etc/rc.local ConditionPathExists=/etc/rc.local