[fixbug] 更新log路径

This commit is contained in:
lichx 2025-01-22 21:35:27 +08:00
parent 069d5119c3
commit f34ef73d0b
2 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,7 @@ haveError |= TaskFailRetry("maa run mall") != 0
haveError |= TaskFailRetry("maa run award") != 0
# storage error log
if haveError:
cp.Command(f"cp {log_dir}/pyshell.log {log_dir}/pyshell.{datetime.now().strftime('%Y-%m-%d-%H-%M-%S')}.log")
cp.Command(f"cp {log_dir}/maa_pyshell.log {log_dir}/maa_pyshell.{datetime.now().strftime('%Y-%m-%d-%H-%M-%S')}.log")
# shutdown
cp.RetryCommand("maa closedown")
cp.Command("docker stop redroid")

View File

@ -5,7 +5,7 @@ MAA_PY="$SCRIPT_DIR/ArknightsMaaConfig/maa.py"
MAA_LOG_DIR="${MAA_LOG:-/var/log/maa.log}"
if [ -x "$MAA_PY" ]; then
"$MAA_PY" > "$MAA_LOG_DIR" 2>&1
"$MAA_PY" > "$MAA_LOG_DIR/maa_pyshell.log" 2>&1
else
python3 "$MAA_PY" > "$MAA_LOG_DIR" 2>&1
python3 "$MAA_PY" > "$MAA_LOG_DIR/maa_pyshell.log" 2>&1
fi