修改日志结束符判定

This commit is contained in:
whyour
2022-10-20 15:16:17 +08:00
parent 42c64c82d7
commit 4194f1964d
12 changed files with 36 additions and 16 deletions
+1
View File
@@ -157,6 +157,7 @@ handle_task_after() {
local diff_time=$(($end_timestamp - $begin_timestamp))
[[ $ID ]] && update_cron "\"$ID\"" "1" "" "$log_path" "$begin_timestamp" "$diff_time"
eval echo -e "\\\n\\\n\#\# 执行结束... $end_time 耗时 $diff_time" $cmd
eval echo -e "\\\n     " $cmd
}
## 正常运行单个脚本,$1:传入参数
+8 -7
View File
@@ -464,8 +464,8 @@ main() {
if [[ -n $p2 ]]; then
update_repo "$p2" "$p3" "$p4" "$p5" "$p6" "$p7"
else
echo -e "命令输入错误...\n"
usage
eval echo -e "命令输入错误...\\\n"
eval usage $cmd
fi
;;
raw)
@@ -473,8 +473,8 @@ main() {
if [[ -n $p2 ]]; then
update_raw "$p2"
else
echo -e "命令输入错误...\n"
usage
eval echo -e "命令输入错误...\\\n"
eval usage $cmd
fi
;;
rmlog)
@@ -497,16 +497,17 @@ main() {
echo "$auth_value" >$file_auth_user
;;
*)
echo -e "命令输入错误...\n"
usage
eval echo -e "命令输入错误...\\\n" $cmd
eval usage $cmd
;;
esac
if [[ -f $file_path ]]; then
cat $file_path
local end_timestamp=$(date "+%s")
local diff_time=$(($end_timestamp - $begin_timestamp))
[[ $ID ]] && update_cron "\"$ID\"" "1" "" "$log_path" "$begin_timestamp" "$diff_time"
eval echo -e "\\\n          " $cmd
cat $file_path
fi
}