分红joy挂机脚本兼容spnode

spnode 执行路径脚本日志文件生成报错修复
This commit is contained in:
iouAkira
2021-03-24 13:16:49 +08:00
parent ec19ab890f
commit a9f8db27bd
2 changed files with 12 additions and 6 deletions

View File

@@ -1,19 +1,24 @@
#!/bin/sh
if [[ -f /usr/bin/jd_bot && -z "$DISABLE_SPNODE" ]]; then
CMD="spnode"
else
CMD="NODE"
fi
echo "处理jd_crazy_joy_coin任务。。。"
if [ ! $CRZAY_JOY_COIN_ENABLE ]; then
echo "默认启用jd_crazy_joy_coin杀掉jd_crazy_joy_coin任务并重启"
eval $(ps -ef | grep "jd_crazy" | grep -v "grep" | awk '{print "kill "$1}')
echo '' >/scripts/logs/jd_crazy_joy_coin.log
node /scripts/jd_crazy_joy_coin.js | ts >>/scripts/logs/jd_crazy_joy_coin.log 2>&1 &
$CMD /scripts/jd_crazy_joy_coin.js | ts >>/scripts/logs/jd_crazy_joy_coin.log 2>&1 &
echo "默认jd_crazy_joy_coin重启完成"
else
if [ $CRZAY_JOY_COIN_ENABLE = "Y" ]; then
echo "配置启用jd_crazy_joy_coin杀掉jd_crazy_joy_coin任务并重启"
eval $(ps -ef | grep "jd_crazy" | grep -v "grep" | awk '{print "kill "$1}')
echo '' >/scripts/logs/jd_crazy_joy_coin.log
node /scripts/jd_crazy_joy_coin.js | ts >>/scripts/logs/jd_crazy_joy_coin.log 2>&1 &
$CMD /scripts/jd_crazy_joy_coin.js | ts >>/scripts/logs/jd_crazy_joy_coin.log 2>&1 &
echo "配置jd_crazy_joy_coin重启完成"
else
eval $(ps -ef | grep "jd_crazy" | grep -v "grep" | awk '{print "kill "$1}')