~修复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 meta_v=v1.19.11
singboxp_v=1.10.0-alpha.29-067c81a7 singboxp_v=1.10.0-alpha.29-067c81a7
singbox_v=1.10.7 singbox_v=1.10.7
versionsh=1.9.2beta3 versionsh=1.9.2beta4
GeoIP_v=20250707 GeoIP_v=20250707

View File

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

View File

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