From dcde061d2aec5a40209a74f8fd6b01491fde46fe Mon Sep 17 00:00:00 2001 From: gshtwy <161450968+gshtwy@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:36:28 +0800 Subject: [PATCH] Update install-socks5-hysteria.sh --- install-socks5-hysteria.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/install-socks5-hysteria.sh b/install-socks5-hysteria.sh index f9f4b189..76114c90 100644 --- a/install-socks5-hysteria.sh +++ b/install-socks5-hysteria.sh @@ -352,15 +352,12 @@ install_nezha_agent(){ # 添加 crontab 守护进程任务 add_crontab_task() { - crontab -l > /tmp/crontab.bak - echo "*/12 * * * * if ! pgrep -x nezha-agent; then nohup $WORKDIR/start.sh >/dev/null 2>&1 &" >> /tmp/crontab.bak - echo "*/12 * * * * if ! pgrep -x s5; then nohup ${FILE_PATH}/s5 -c ${FILE_PATH}/config.json >/dev/null 2>&1 & " >> /tmp/crontab.bak - echo "*/12 * * * * if ! pgrep -x web; then nohup $HYSTERIA_WORKDIR/web server $HYSTERIA_WORKDIR/config.yaml >/dev/null 2>&1 & " >> /tmp/crontab.bak - crontab /tmp/crontab.bak - rm /tmp/crontab.bak + echo -e "\e[1;33m正在添加 crontab 任务...\033[0m" + curl -s https://raw.githubusercontent.com/gshtwy/socks5-hysteria2-for-Serv00-CT8/main/crtest.sh | bash echo -e "\e[1;32mCrontab 任务添加完成\e[0m" } + # 主程序 read -p "是否安装 Hysteria?(Y/N 回车N)" install_hysteria_answer install_hysteria_answer=${install_hysteria_answer^^}