|
|
@ -1,12 +1,11 @@ |
|
|
|
#!/bin/sh |
|
|
|
#!/bin/sh |
|
|
|
## spider watcher, work with start_cloud_in_container.sh |
|
|
|
## spider watcher, work with start_cloud_in_container.sh |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
script_root=$(dirname $0) |
|
|
|
|
|
|
|
cd $script_root |
|
|
|
|
|
|
|
|
|
|
|
watcher() |
|
|
|
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` |
|
|
|
spider_num=`ps -ef | grep 'node spider.mjs' | grep -v grep | wc -l` |
|
|
|
|
|
|
|
|
|
|
|
if [ $spider_num -lt 1 ]; then |
|
|
|
if [ $spider_num -lt 1 ]; then |
|
|
|