From 0f841b7095628bc213fd2e21a7dfe076ff576811 Mon Sep 17 00:00:00 2001 From: filesite Date: Sat, 28 Jun 2025 10:30:35 +0800 Subject: [PATCH] improve spider watcher --- spider_watcher.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spider_watcher.sh b/spider_watcher.sh index b36e34d..ef43cfb 100755 --- a/spider_watcher.sh +++ b/spider_watcher.sh @@ -1,12 +1,11 @@ #!/bin/sh ## spider watcher, work with start_cloud_in_container.sh +script_root=$(dirname $0) +cd $script_root watcher() { - # you should change this directory path - script_root='~/Develop/machete_hero/' - spider_num=`ps -ef | grep 'node spider.mjs' | grep -v grep | wc -l` if [ $spider_num -lt 1 ]; then