v1.0.0beta18.2
~修复部分情况下首次安装本地面板报错的bug ~修复卸载时无法正确移除定时任务的bug
This commit is contained in:
@@ -652,9 +652,9 @@ setcrt(){
|
|||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "\033[36m安装/更新本地根证书文件(ca-certificates.crt)\033[0m"
|
echo -e "\033[36m安装/更新本地根证书文件(ca-certificates.crt)\033[0m"
|
||||||
echo -e "\033[33m用于解决证书校验错误,x509报错等问题\033[0m"
|
echo -e "\033[33m用于解决证书校验错误,x509报错等问题\033[0m"
|
||||||
echo -e "\033[31m无上述问题的设备无需使用本功能!\033[0m"
|
echo -e "\033[31m无上述问题的设备请勿使用!\033[0m"
|
||||||
[ -f "$crtdir" ] && echo -e "\033[32m当前设备已经安装根证书文件了!\033[0m"
|
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
|
[ -f "$crtdir" ] && echo -e "\033[33m检测到系统已经安装根证书文件了!\033[0m\n-----------------------------------------------"
|
||||||
read -p "确认安装?(1/0) > " res
|
read -p "确认安装?(1/0) > " res
|
||||||
|
|
||||||
if [ -z "$res" ];then
|
if [ -z "$res" ];then
|
||||||
@@ -820,19 +820,19 @@ update(){
|
|||||||
read -p "确认卸载ShellClash?(警告:该操作不可逆!)[1/0] " res
|
read -p "确认卸载ShellClash?(警告:该操作不可逆!)[1/0] " res
|
||||||
if [ "$res" = '1' ]; then
|
if [ "$res" = '1' ]; then
|
||||||
$clashdir/start.sh stop
|
$clashdir/start.sh stop
|
||||||
rm -rf $clashdir
|
$clashdir/start.sh cronset "clash服务"
|
||||||
rm -rf /etc/init.d/clash
|
$clashdir/start.sh cronset "订阅链接"
|
||||||
rm -rf /etc/systemd/system/clash.service
|
|
||||||
rm -rf /usr/lib/systemd/system/clash.service
|
|
||||||
rm -rf /www/clash
|
|
||||||
[ -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
|
||||||
sed -i '/export clashdir=*/'d $profile
|
sed -i '/export clashdir=*/'d $profile
|
||||||
sed -i '/all_proxy/'d $profile
|
sed -i '/all_proxy/'d $profile
|
||||||
sed -i '/ALL_PROXY/'d $profile
|
sed -i '/ALL_PROXY/'d $profile
|
||||||
cronset "clash服务"
|
rm -rf $clashdir
|
||||||
cronset "订阅链接"
|
rm -rf /etc/init.d/clash
|
||||||
|
rm -rf /etc/systemd/system/clash.service
|
||||||
|
rm -rf /usr/lib/systemd/system/clash.service
|
||||||
|
rm -rf /www/clash
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "\033[36m已卸载ShellClash相关文件!有缘再会!\033[0m"
|
echo -e "\033[36m已卸载ShellClash相关文件!有缘再会!\033[0m"
|
||||||
echo -e "\033[33m请手动关闭当前窗口以重置环境变量!\033[0m"
|
echo -e "\033[33m请手动关闭当前窗口以重置环境变量!\033[0m"
|
||||||
@@ -919,14 +919,14 @@ userguide(){
|
|||||||
echo -e "\033[33m安装本地Dashboard面板,可以更快捷的管理clash内置规则!\033[0m"
|
echo -e "\033[33m安装本地Dashboard面板,可以更快捷的管理clash内置规则!\033[0m"
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
read -p "需要安装本地Dashboard面板吗?(1/0) > " res
|
read -p "需要安装本地Dashboard面板吗?(1/0) > " res
|
||||||
[ "$res" = 1 ] && setdb
|
[ "$res" = 1 ] && checkupdate && setdb
|
||||||
#检测及下载根证书
|
#检测及下载根证书
|
||||||
if [ -d /etc/ssl/certs -a ! -f '/etc/ssl/certs/ca-certificates.crt' ];then
|
if [ -d /etc/ssl/certs -a ! -f '/etc/ssl/certs/ca-certificates.crt' ];then
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "\033[33m当前设备未找到根证书文件\033[0m"
|
echo -e "\033[33m当前设备未找到根证书文件\033[0m"
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
read -p "是否下载并安装根证书?(1/0) > " res
|
read -p "是否下载并安装根证书?(1/0) > " res
|
||||||
[ "$res" = 1 ] && getcrt
|
[ "$res" = 1 ] && checkupdate && getcrt
|
||||||
fi
|
fi
|
||||||
#提示导入订阅或者配置文件
|
#提示导入订阅或者配置文件
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
|
|||||||
@@ -657,6 +657,9 @@ daemon)
|
|||||||
getconfig
|
getconfig
|
||||||
cronset '#clash保守模式守护进程' "*/1 * * * * test -z \"$(pidof clash)\" && $clashdir/start.sh restart #clash保守模式守护进程"
|
cronset '#clash保守模式守护进程' "*/1 * * * * test -z \"$(pidof clash)\" && $clashdir/start.sh restart #clash保守模式守护进程"
|
||||||
;;
|
;;
|
||||||
|
cronset)
|
||||||
|
cronset $2 $3
|
||||||
|
;;
|
||||||
set_proxy)
|
set_proxy)
|
||||||
getconfig
|
getconfig
|
||||||
#GNOME配置
|
#GNOME配置
|
||||||
|
|||||||
Reference in New Issue
Block a user