This commit is contained in:
Yawasau
2022-05-08 14:29:54 +08:00
parent 22d3aa7dcb
commit 6e4d90114c
7 changed files with 138 additions and 80 deletions

17
終止腳本.sh Normal file
View File

@@ -0,0 +1,17 @@
if [ -f "${0%/*}/tools/bin/bin.sh" ]; then
MODDIR="${0%/*}"
bin_path="$MODDIR/tools/bin"
[[ $(find "$MODDIR" -maxdepth 1 -name "*.zip" -type f 2>/dev/null) ]] && echo "警告!此腳本不能拿來更新腳本" && exit 2
. "$MODDIR/tools/bin/bin.sh"
touch "$TMPDIR/STOP_script"
echoRgb "等待腳本停止中,請稍後....."
{
while [[ -f $TMPDIR/STOP_script ]]; do
sleep 1
done
} &
wait && echoRgb "已經停止" "1"
exit
else
echo "$MODDIR/tools/bin/bin.sh遗失"
fi