Update socat.sh

master
iiiiiii1 2018-05-11 19:47:29 +08:00 committed by GitHub
parent 580d7b5e46
commit 84684692d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -64,8 +64,9 @@ start_socat(){
chmod +x /etc/rc.d/rc.local
else
source /etc/os-release &>/dev/null
if [[ "${ID}" == "debian" && ${VERSION_ID} -ge 9 ]];then
elif [[ "${ID}" == "ubuntu" && ${VERSION_ID} | cut -d '.' -f1` -ge 18 ]];then
echo -e "${Green}检测到 Debian${VERSION_ID} 无/etc/rc.local自启正在为其配置... ${Font} "
elif [[ "${ID}" == "ubuntu" && `echo "${VERSION_ID}" | cut -d '.' -f1` -ge 18 ]];then
echo -e "${Green}检测到 Ubuntu${VERSION_ID} 无/etc/rc.local自启正在为其配置... ${Font} "
echo "[Unit]
Description=/etc/rc.local
ConditionPathExists=/etc/rc.local