🤖️sync 2021-08-17 01:28:20

This commit is contained in:
root 2021-08-17 01:28:20 +08:00
parent 33976c827d
commit 908a5717ac
2 changed files with 7 additions and 10 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
## Build 20210816-001 ## Build 20210817-001
## 导入通用变量与函数 ## 导入通用变量与函数
dir_shell=/ql/shell dir_shell=/ql/shell
@ -668,9 +668,12 @@ install_dependencies_all(){
done done
} }
kill_proc(){
ps -ef|grep "$1"|grep -Ev "$2"|awk '{print $1}'|xargs kill -9
}
## 执行并写入日志 ## 执行并写入日志
ps -ef|grep "code.sh"|grep -Ev "grep|$$"|awk '{print $1}'|xargs kill -9 >/dev/null 2>&1 kill_proc "code.sh" "grep|$$" >/dev/null 2>&1
[[ $FixDependType = "1" ]] && [[ "$ps_num" -le $proc_num ]] && install_dependencies_all >/dev/null 2>&1 & [[ $FixDependType = "1" ]] && [[ "$ps_num" -le $proc_num ]] && install_dependencies_all >/dev/null 2>&1 &
latest_log=$(ls -r $dir_code | head -1) latest_log=$(ls -r $dir_code | head -1)
latest_log_path="$dir_code/$latest_log" latest_log_path="$dir_code/$latest_log"

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build 20210815-002 # Build 20210817-001
p1=$1 p1=$1
@ -173,13 +173,7 @@ team_task(){
result=$(echo -e "$COOKIES_HEAD$COOKIES") result=$(echo -e "$COOKIES_HEAD$COOKIES")
if [[ $result ]]; then if [[ $result ]]; then
export JD_COOKIE=$result export JD_COOKIE=$result
if [[ ${#activityId[*]} -gt 0 ]]; then
for ((k=0; k<=${#activityId[*]}; k++)); do
node /ql/scripts/$scr node /ql/scripts/$scr
done
else
node /ql/scripts/$scr
fi
fi fi
# echo $JD_COOKIE # echo $JD_COOKIE
done done