mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-11 07:51:45 +00:00
~修复小闪存模式部分情况下启动报错的bug
This commit is contained in:
@@ -81,11 +81,8 @@ done
|
||||
setconfig versionsh_l $version
|
||||
#生成用于执行启动服务的变量文件
|
||||
[ ! -f "$CRASHDIR"/configs/command.env ] && {
|
||||
TMPDIR='/tmp/ShellCrash'
|
||||
BINDIR="$CRASHDIR"
|
||||
touch "$CRASHDIR"/configs/command.env
|
||||
setconfig TMPDIR "$TMPDIR" "$CRASHDIR"/configs/command.env
|
||||
setconfig BINDIR "$BINDIR" "$CRASHDIR"/configs/command.env
|
||||
echo 'TMPDIR=/tmp/ShellCrash' > "$CRASHDIR"/configs/command.env
|
||||
echo "BINDIR=$CRASHDIR" >> "$CRASHDIR"/configs/command.env
|
||||
}
|
||||
if [ -n "$(grep 'crashcore=singbox' "$CFG_PATH")" ]; then
|
||||
COMMAND='"$TMPDIR/CrashCore run -D $BINDIR -C $TMPDIR/jsons"'
|
||||
|
||||
@@ -129,7 +129,7 @@ setboot() {
|
||||
msg_alert "\033[33m已经停用小闪存功能!\033[0m"
|
||||
fi
|
||||
fi
|
||||
setconfig BINDIR "$BINDIR" "$CRASHDIR"/configs/command.env
|
||||
sed -i "s#BINDIR=.*#BINDIR=$BINDIR#" "$CRASHDIR"/configs/command.env
|
||||
sleep 1
|
||||
;;
|
||||
5)
|
||||
@@ -201,7 +201,7 @@ setboot() {
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
setconfig BINDIR "$BINDIR" "$CRASHDIR"/configs/command.env
|
||||
sed -i "s#BINDIR=.*#BINDIR=$BINDIR#" "$CRASHDIR"/configs/command.env
|
||||
break
|
||||
done
|
||||
;;
|
||||
|
||||
@@ -99,7 +99,7 @@ userguide() {
|
||||
read -r -p "$COMMON_INPUT_R" res
|
||||
[ "$res" = 1 ] && {
|
||||
BINDIR=/tmp/ShellCrash
|
||||
setconfig BINDIR /tmp/ShellCrash "$CRASHDIR"/configs/command.env
|
||||
sed -i "s#BINDIR=.*#BINDIR=$BINDIR" "$CRASHDIR"/configs/command.env
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user