mirror of
https://github.com/whyour/qinglong.git
synced 2025-11-10 00:26:09 +08:00
Fix PM2 log file path and add existence checks
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
parent
7d2a570924
commit
f33d5e8cdf
|
|
@ -24,10 +24,18 @@ copy_dep() {
|
||||||
|
|
||||||
pm2_log() {
|
pm2_log() {
|
||||||
echo -e "---> pm2日志"
|
echo -e "---> pm2日志"
|
||||||
local panelOut="/root/.pm2/logs/panel-out.log"
|
local panelOut="/root/.pm2/logs/qinglong-out.log"
|
||||||
local panelError="/root/.pm2/logs/panel-error.log"
|
local panelError="/root/.pm2/logs/qinglong-error.log"
|
||||||
tail -n 300 "$panelOut"
|
if [[ -f "$panelOut" ]]; then
|
||||||
tail -n 300 "$panelError"
|
tail -n 300 "$panelOut"
|
||||||
|
else
|
||||||
|
echo "日志文件不存在: $panelOut"
|
||||||
|
fi
|
||||||
|
if [[ -f "$panelError" ]]; then
|
||||||
|
tail -n 300 "$panelError"
|
||||||
|
else
|
||||||
|
echo "日志文件不存在: $panelError"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_ql() {
|
check_ql() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user