~修复Zashboard面板在小闪存模式下无法正常使用的bug

~修复部分极端情况下卸载脚本时会删除系统根目录的bug
This commit is contained in:
juewuy
2025-07-07 20:04:55 +08:00
parent 1eb00a5108
commit afa13cce62
5 changed files with 22 additions and 13 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -4,5 +4,5 @@ clash_v=v1.7.1
meta_v=v1.19.11
singboxp_v=1.10.0-alpha.29-067c81a7
singbox_v=1.10.7
versionsh=1.9.2beta3
versionsh=1.9.2beta4
GeoIP_v=20250707

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright (C) Juewuy
version=1.9.2beta3
version=1.9.2beta4
setdir() {
dir_avail() {

View File

@@ -1825,23 +1825,31 @@ autoSSH() {
uninstall() {
read -p "确认卸载ShellCrash(警告:该操作不可逆!)[1/0] > " res
if [ "$res" = '1' ]; then
#停止服务
${CRASHDIR}/start.sh stop 2>/dev/null
${CRASHDIR}/start.sh cronset "clash服务" 2>/dev/null
${CRASHDIR}/start.sh cronset "订阅链接" 2>/dev/null
${CRASHDIR}/start.sh cronset "ShellCrash初始化" 2>/dev/null
${CRASHDIR}/start.sh cronset "task.sh" 2>/dev/null
read -p "是否保留脚本配置及订阅文件?[1/0] > " res
if [ "$res" = '1' ]; then
mv -f ${CRASHDIR}/configs /tmp/ShellCrash
mv -f ${CRASHDIR}/yamls /tmp/ShellCrash
mv -f ${CRASHDIR}/jsons /tmp/ShellCrash
rm -rf ${CRASHDIR}/*
mv -f /tmp/ShellCrash/configs ${CRASHDIR}
mv -f /tmp/ShellCrash/yamls ${CRASHDIR}
mv -f /tmp/ShellCrash/jsons ${CRASHDIR}
#移除安装目录
if [ -n "${CRASHDIR}" ] && [ "${CRASHDIR}" != '/' ];then
read -p "是否保留脚本配置及订阅文件?[1/0] > " res
if [ "$res" = '1' ]; then
mv -f ${CRASHDIR}/configs /tmp/ShellCrash
mv -f ${CRASHDIR}/yamls /tmp/ShellCrash
mv -f ${CRASHDIR}/jsons /tmp/ShellCrash
rm -rf ${CRASHDIR}/*
mv -f /tmp/ShellCrash/configs ${CRASHDIR}
mv -f /tmp/ShellCrash/yamls ${CRASHDIR}
mv -f /tmp/ShellCrash/jsons ${CRASHDIR}
else
rm -rf ${CRASHDIR}
fi
else
rm -rf ${CRASHDIR}
echo -e "\033[31m环境变量配置有误请尝试手动移除安装目录\033[0m"
sleep 1
fi
#移除其他内容
[ -w ~/.bashrc ] && profile=~/.bashrc
[ -w /etc/profile ] && profile=/etc/profile
sed -i '/alias clash=*/'d $profile
@@ -1871,8 +1879,9 @@ uninstall() {
echo -e "\033[33m请手动关闭当前窗口以重置环境变量\033[0m"
echo -----------------------------------------------
exit
else
echo -e "\033[31m操作已取消\033[0m"
fi
echo -e "\033[31m操作已取消\033[0m"
}
tools() {
ssh_tools() {