~拆分command.env文件,防止偶然情况下出现找不到运行目录的bug

This commit is contained in:
juewuy
2026-10-24 17:33:40 +08:00
parent 670eca688c
commit 1313c395e5
7 changed files with 25 additions and 10 deletions
+2 -1
View File
@@ -6,7 +6,8 @@ description="Custom proxy service for ShellCrash"
#获取目录
CRASHDIR=$(cat /etc/profile | grep CRASHDIR | awk -F "\"" '{print $2}')
[ -z "$CRASHDIR" ] && CRASHDIR=$(cat ~/.bashrc | grep CRASHDIR | awk -F "\"" '{print $2}')
. ${CRASHDIR}/configs/command.env #加载启动命令和启动目录
. "${CRASHDIR}"/configs/directories.env #加载启动目录
. "${CRASHDIR}"/configs/command.env #加载启动命令
# PID 文件
pidfile="/run/shellcrash.pid"