|
@@ -20,21 +20,26 @@ if [ ${machine} = "macpro" ];then
|
|
|
piaoquan_crawler_dir=/Users/lieyunye/Desktop/piaoquan_crawler/
|
|
|
profile_path=.bash_profile
|
|
|
node_path=/usr/local/bin/node
|
|
|
+ python=python3
|
|
|
elif [ ${machine} = "macair" ];then
|
|
|
piaoquan_crawler_dir=/Users/piaoquan/Desktop/piaoquan_crawler/
|
|
|
profile_path=./base_profile
|
|
|
node_path=/usr/local/bin/node
|
|
|
+ python=python3
|
|
|
elif [ ${machine} = "aliyun" ];then
|
|
|
piaoquan_crawler_dir=/data5/wangkun/piaoquan_crawler/
|
|
|
profile_path=/etc/profile
|
|
|
+ python=python
|
|
|
elif [ ${machine} = "local" ];then
|
|
|
piaoquan_crawler_dir=/Users/wangkun/Desktop/crawler/piaoquan_crawler/
|
|
|
profile_path=/etc/profile
|
|
|
node_path=/opt/homebrew/bin/node
|
|
|
+ python=python3
|
|
|
else
|
|
|
piaoquan_crawler_dir=/Users/wangkun/Desktop/crawler/piaoquan_crawler/
|
|
|
profile_path=/etc/profile
|
|
|
node_path=/opt/homebrew/bin/node
|
|
|
+ python=python3
|
|
|
fi
|
|
|
|
|
|
echo "$(date "+%Y-%m-%d %H:%M:%S") 更新环境变量..."
|
|
@@ -66,7 +71,7 @@ else
|
|
|
fi
|
|
|
|
|
|
echo "$(date "+%Y-%m-%d %H:%M:%S") 正在重启服务..."
|
|
|
-nohup python3 -u ${crawler_dir} ${log_type} ${crawler} ${strategy} ${oss_endpoint} ${env} ${machine} >>${nohup_dir} 2>&1 &
|
|
|
+nohup ${python} -u ${crawler_dir} ${log_type} ${crawler} ${strategy} ${oss_endpoint} ${env} ${machine} >>${nohup_dir} 2>&1 &
|
|
|
echo "$(date "+%Y-%m-%d %H:%M:%S") 服务重启完毕!"
|
|
|
|
|
|
exit 0
|