diff --git a/scripts/libs/set_cron.sh b/scripts/libs/set_cron.sh index 1f0972cb..2af0d57d 100644 --- a/scripts/libs/set_cron.sh +++ b/scripts/libs/set_cron.sh @@ -6,9 +6,11 @@ crondir="$(crond -h 2>&1 | grep -oE 'Default:.*' | awk -F ":" '{print $2}')" tmpcron="$TMPDIR"/cron_tmp croncmd() { #定时任务工具 - if [ -w "$crondir" ]; then - [ "$1" = "-l" ] && cat "$crondir"/"$USER" + if [ -w "$crondir" ] && [ -n "$USER" ];then + [ "$1" = "-l" ] && cat "$crondir"/"$USER" 2>/dev/null [ -f "$1" ] && cat "$1" >"$crondir"/"$USER" + elif [ -n "$(crontab -h 2>&1 | grep '\-l')" ]; then + crontab "$1" else echo "找不到可用的crond或者crontab应用!No available crond or crontab application can be found!" fi diff --git a/scripts/menus/9_upgrade.sh b/scripts/menus/9_upgrade.sh index 4fe38ecc..29840b38 100644 --- a/scripts/menus/9_upgrade.sh +++ b/scripts/menus/9_upgrade.sh @@ -389,7 +389,7 @@ setziptype(){ echo "-----------------------------------------------" echo -e " 1 \033[32m标准编译release版本,gz压缩\033[0m-完整支持脚本全部内置功能" echo -e " 2 \033[36m最简编译release版本,upx压缩\033[0m-不支持Gvisor,Tailscale,Wireguard,NaiveProxy" - echo -e " 3 \033[33m完整编译dev版本,tar.gz压缩\033[0m-占用可能略高,稳定性自测" + #echo -e " 3 \033[33m完整编译dev版本,tar.gz压缩\033[0m-占用可能略高,稳定性自测" echo "-----------------------------------------------" echo " 0 返回上级菜单" read -p "请输入对应数字 > " num @@ -430,7 +430,7 @@ setcore(){ #内核选择菜单 echo -e "2 \033[43;30m SingBoxR \033[0m: \033[32m支持全面\033[0m" echo -e " >>\033[32m$singboxr_v \033[33m使用reF1nd增强分支\033[0m" echo -e " 说明文档: \033[36;4mhttps://sing-boxr.dustinwin.us.kg\033[0m" - [ "$zip_type" = 'tar.gz' ] && { + [ "$zip_type" = 'upx' ] && { echo -e "3 \033[43;30m SingBox \033[0m: \033[32m占用较低\033[0m" echo -e " >>\033[32m$singbox_v \033[33m不支持providers\033[0m" echo -e " 说明文档: \033[36;4mhttps://sing-box.sagernet.org\033[0m" diff --git a/scripts/starts/afstart.sh b/scripts/starts/afstart.sh index 140a62bb..e71e79c7 100644 --- a/scripts/starts/afstart.sh +++ b/scripts/starts/afstart.sh @@ -18,7 +18,7 @@ #设置循环检测面板端口以判定服务启动是否成功 . "$CRASHDIR"/libs/start_wait.sh if [ -n "$test" -o -n "$(pidof CrashCore)" ]; then - [ "$start_old" = "已开启" ] && rm -rf "$TMPDIR"/CrashCore #删除缓存目录内核文件 + [ "$start_old" = "已开启" ] && [ ! -L "$TMPDIR"/CrashCore ] && rm -f "$TMPDIR"/CrashCore #删除缓存目录内核文件 . "$CRASHDIR"/starts/fw_start.sh #配置防火墙流量劫持 date +%s >"$TMPDIR"/crash_start_time #标记启动时间 #TG机器人守护进程