Update sb.sh
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
red='\033[0;31m'
|
red='\033[0;31m'
|
||||||
green='\033[0;32m'
|
green='\033[0;32m'
|
||||||
@@ -2472,7 +2471,7 @@ sbshare > /dev/null 2>&1
|
|||||||
blue "Argo临时隧道申请成功,域名验证有效:$argo" && sleep 2
|
blue "Argo临时隧道申请成功,域名验证有效:$argo" && sleep 2
|
||||||
crontab -l 2>/dev/null > /tmp/crontab.tmp
|
crontab -l 2>/dev/null > /tmp/crontab.tmp
|
||||||
sed -i '/sbargopid/d' /tmp/crontab.tmp
|
sed -i '/sbargopid/d' /tmp/crontab.tmp
|
||||||
echo '@reboot sleep 10 && /bin/bash -c "nohup /etc/s-box/cloudflared tunnel --url http://localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port') --edge-ip-version auto --no-autoupdate --protocol http2 > /etc/s-box/argo.log 2>&1 & pid=\$! && echo \$pid > /etc/s-box/sbargopid.log"' >> /tmp/crontab.tmp
|
echo '@reboot sleep 10 && /bin/bash -c "nohup /etc/s-box/cloudflared tunnel --url http://localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port') --edge-ip-version auto --no-autoupdate --protocol http2 > /etc/s-box/argo.log 2>&1 & pid=\$! && echo \$pid > /etc/s-box/sbargopid.log && sleep 5 && printf \"9\n1\n\" | bash /usr/bin/sb > /dev/null 2>&1"' >> /tmp/crontab.tmp
|
||||||
crontab /tmp/crontab.tmp >/dev/null 2>&1
|
crontab /tmp/crontab.tmp >/dev/null 2>&1
|
||||||
rm /tmp/crontab.tmp
|
rm /tmp/crontab.tmp
|
||||||
else
|
else
|
||||||
@@ -3135,9 +3134,9 @@ sleep 5
|
|||||||
crontab -l 2>/dev/null > /tmp/crontab.tmp
|
crontab -l 2>/dev/null > /tmp/crontab.tmp
|
||||||
sed -i '/subcmsbid/d' /tmp/crontab.tmp
|
sed -i '/subcmsbid/d' /tmp/crontab.tmp
|
||||||
if [[ x"${release}" == x"alpine" ]]; then
|
if [[ x"${release}" == x"alpine" ]]; then
|
||||||
echo '@reboot sleep 10 && /bin/bash -c "busybox-extras httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 & pid=\$! && echo \$pid > /etc/s-box/subcmsbid.log && sleep 5 && /bin/bash -c '"'"'. /usr/bin/sb && sbshare'"'"' > /dev/null 2>&1"' >> /tmp/crontab.tmp
|
echo '@reboot sleep 10 && /bin/bash -c "busybox-extras httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 & pid=\$! && echo \$pid > /etc/s-box/subcmsbid.log"' >> /tmp/crontab.tmp
|
||||||
else
|
else
|
||||||
echo '@reboot sleep 10 && /bin/bash -c "busybox httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 & pid=\$! && echo \$pid > /etc/s-box/subcmsbid.log && sleep 5 && /bin/bash -c '"'"'. /usr/bin/sb && sbshare'"'"' > /dev/null 2>&1"' >> /tmp/crontab.tmp
|
echo '@reboot sleep 10 && /bin/bash -c "busybox httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 & pid=\$! && echo \$pid > /etc/s-box/subcmsbid.log"' >> /tmp/crontab.tmp
|
||||||
fi
|
fi
|
||||||
crontab /tmp/crontab.tmp >/dev/null 2>&1
|
crontab /tmp/crontab.tmp >/dev/null 2>&1
|
||||||
rm /tmp/crontab.tmp
|
rm /tmp/crontab.tmp
|
||||||
|
|||||||
Reference in New Issue
Block a user