diff --git a/bin/ShellCrash.tar.gz b/bin/ShellCrash.tar.gz index 9d830fc..8bafb39 100644 Binary files a/bin/ShellCrash.tar.gz and b/bin/ShellCrash.tar.gz differ diff --git a/bin/clashfm.tar.gz b/bin/clashfm.tar.gz index 5aac30e..57e36e5 100644 Binary files a/bin/clashfm.tar.gz and b/bin/clashfm.tar.gz differ diff --git a/bin/public.tar.gz b/bin/public.tar.gz index 8ed160d..f6700cf 100644 Binary files a/bin/public.tar.gz and b/bin/public.tar.gz differ diff --git a/bin/version b/bin/version index 2563308..0864462 100644 --- a/bin/version +++ b/bin/version @@ -5,4 +5,4 @@ meta_v=v1.18.0 singboxp_v=1.8.5-73d97226 singbox_v=1.8.5 GeoIP_v=20240203 -versionsh=1.9.0pre4 +versionsh=1.9.0pre5 diff --git a/scripts/getdate.sh b/scripts/getdate.sh index 68f8bb5..f9b6448 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -1216,7 +1216,6 @@ getcore(){ #下载内核文件 else tar -zcf ${BINDIR}/CrashCore.tar.gz ${tar_para} -C ${TMPDIR} CrashCore fi - rm -rf ${TMPDIR}/CrashCore.tar.gz #小闪存模式清理文件优化内存占用 setconfig crashcore $crashcore setconfig core_v $core_v setconfig custcorelink $custcorelink diff --git a/scripts/init.sh b/scripts/init.sh index c25a572..73d2e33 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) Juewuy -version=1.9.0pre4 +version=1.9.0pre5 setdir(){ dir_avail(){ @@ -160,6 +160,7 @@ else [ -w /etc/systemd/system ] && sysdir=/etc/systemd/system if [ -n "$sysdir" -a "$USER" = "root" -a "$(cat /proc/1/comm)" = "systemd" ];then #创建shellcrash用户 + ckcmd userdel && userdel shellcrash 2>/dev/null sed -i '/0:7890/d' /etc/passwd sed -i '/x:7890/d' /etc/group if type useradd >/dev/null 2>&1; then @@ -173,9 +174,10 @@ else sed -i "s%/etc/ShellCrash%$CRASHDIR%g" $sysdir/shellcrash.service rm -rf $sysdir/clash.service #旧版文件清理 systemctl daemon-reload - fi + else #设为保守模式启动 setconfig start_old 已开启 + fi fi #修饰文件及版本号 command -v bash >/dev/null 2>&1 && shtype=bash || shtype=sh diff --git a/scripts/menu.sh b/scripts/menu.sh index a28a780..5473647 100644 --- a/scripts/menu.sh +++ b/scripts/menu.sh @@ -990,11 +990,13 @@ setboot(){ #启动相关设置 2) if [ "$start_old" = "未开启" ] > /dev/null 2>&1; then echo -e "\033[33m改为使用保守模式启动服务!!\033[0m" + [ -d /etc/rc.d ] && cd /etc/rc.d && rm -rf *shellcrash > /dev/null 2>&1 && cd - >/dev/null + ckcmd systemctl && systemctl disable shellcrash.service > /dev/null 2>&1 start_old=已开启 setconfig start_old $start_old ${CRASHDIR}/start.sh stop else - if [ -n "$(pidof procd)" -o -w /etc/systemd/system -o -w /usr/lib/systemd/system ];then + if [ "$(cat /proc/1/comm)" = "procd" -o "$(cat /proc/1/comm)" = "systemd" ];then echo -e "\033[32m改为使用系统守护进程启动服务!!\033[0m" ${CRASHDIR}/start.sh cronset "ShellCrash初始化" start_old=未开启 diff --git a/scripts/start.sh b/scripts/start.sh index e2264a0..ef2877c 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1536,7 +1536,6 @@ core_check(){ #检查及下载内核文件 else mv -f ${TMPDIR}/core_new ${TMPDIR}/CrashCore mv -f ${TMPDIR}/CrashCore.tar.gz ${BINDIR}/CrashCore.tar.gz - rm -rf ${TMPDIR}/CrashCore.tar.gz #小闪存模式清理文件优化内存占用 setconfig COMMAND "$COMMAND" ${CRASHDIR}/configs/command.env && source ${CRASHDIR}/configs/command.env setconfig crashcore $crashcore setconfig core_v $core_v @@ -1637,6 +1636,7 @@ bfstart(){ #启动前 #添加shellcrash用户 [ -n "$(echo $local_type | grep '增强模式')" -o "$(cat /proc/1/comm)" = "systemd" ] && \ [ -z "$(id shellcrash 2>/dev/null | grep 'root')" ] && { + ckcmd userdel && userdel shellcrash 2>/dev/null sed -i '/0:7890/d' /etc/passwd sed -i '/x:7890/d' /etc/group if ckcmd useradd; then @@ -1672,6 +1672,7 @@ afstart(){ #启动后 i=$((i+1)) done if [ -n "$test" -o -n "$(pidof CrashCore)" ];then + rm -rf ${TMPDIR}/CrashCore #删除缓存目录内核文件 #设置DNS转发 start_dns(){ [ "$dns_mod" != "fake-ip" ] && [ "$cn_ip_route" = "已开启" ] && cn_ip_route diff --git a/scripts/task.sh b/scripts/task.sh index cb40913..30f1938 100644 --- a/scripts/task.sh +++ b/scripts/task.sh @@ -389,6 +389,7 @@ task_manager(){ #任务管理列表 cat ${TMPDIR}/task_cronlist ${CRASHDIR}/task/running 2>/dev/null | sort -u | grep -oE "task/task.sh .*" | awk -F ' ' '{print $2" "$3}' > ${TMPDIR}/task_list cat ${CRASHDIR}/task/bfstart ${CRASHDIR}/task/afstart ${CRASHDIR}/task/affirewall 2>/dev/null | awk -F ' ' '{print $2" "$3}' >> ${TMPDIR}/task_list cat ${TMPDIR}/task_cronlist 2>/dev/null | sort -u | grep -oE " #.*" | grep -v "守护" | awk -F '#' '{print "0 旧版任务-"$2}' >> ${TMPDIR}/task_list + sed -i '/^ *$/d' ${TMPDIR}/task_list rm -rf ${TMPDIR}/task_cronlist #判断为空则返回 if [ ! -s ${TMPDIR}/task_list ];then