Skip to content

Commit

Permalink
Update install-socks5-hysteria.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
gshtwy authored Aug 23, 2024
1 parent 9769021 commit a70e684
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install-socks5-hysteria.sh
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,9 @@ install_nezha_agent(){
# 添加 crontab 守护进程任务
add_crontab_task() {
crontab -l > /tmp/crontab.bak
echo "*/1 * * * * if ! pgrep -f nezha-agent; then nohup $WORKDIR/start.sh >/dev/null 2>&1 & fi" >> /tmp/crontab.bak
echo "*/1 * * * * if ! pgrep -x s5; then nohup ${FILE_PATH}/s5 -c ${FILE_PATH}/config.json >/dev/null 2>&1 & fi" >> /tmp/crontab.bak
echo "*/1 * * * * if ! pgrep -x web; then nohup $HYSTERIA_WORKDIR/web server $HYSTERIA_WORKDIR/config.yaml >/dev/null 2>&1 & fi" >> /tmp/crontab.bak
echo "*/12 * * * * if ! pgrep -f nezha-agent; then nohup $WORKDIR/start.sh >/dev/null 2>&1 & fi" >> /tmp/crontab.bak
echo "*/12 * * * * if ! pgrep -x s5; then nohup ${FILE_PATH}/s5 -c ${FILE_PATH}/config.json >/dev/null 2>&1 & fi" >> /tmp/crontab.bak
echo "*/12 * * * * if ! pgrep -x web; then nohup $HYSTERIA_WORKDIR/web server $HYSTERIA_WORKDIR/config.yaml >/dev/null 2>&1 & fi" >> /tmp/crontab.bak
crontab /tmp/crontab.bak
rm /tmp/crontab.bak
echo -e "\e[1;32mCrontab 任务添加完成\e[0m"
Expand Down

0 comments on commit a70e684

Please sign in to comment.