~运行后每分钟执行的定时任务逻辑调整,支持按小时设置
~修复任务日志推送无法关闭的bug
~修复华硕/Padavan重启后找不到crash命令的bug
~修复部分显示问题
This commit is contained in:
juewuy
2024-01-04 19:39:45 +08:00
parent b2d0806d37
commit de02f653ea
3 changed files with 25 additions and 15 deletions

View File

@@ -136,7 +136,7 @@ put_save(){
fi
}
mark_time(){
echo `date +%s` > $TMPDIR/clash_start_time
echo `date +%s` > $TMPDIR/crash_start_time
}
getlanip(){
i=1
@@ -1270,7 +1270,7 @@ afstart(){
#读取配置文件
getconfig
#延迟启动
[ ! -f $TMPDIR/clash_start_time ] && [ -n "$start_delay" ] && [ "$start_delay" -gt 0 ] && {
[ ! -f $TMPDIR/crash_start_time ] && [ -n "$start_delay" ] && [ "$start_delay" -gt 0 ] && {
logger "clash将延迟$start_delay秒启动" 31 pushoff
sleep $start_delay
}
@@ -1418,11 +1418,11 @@ init)
profile=$(cat /etc/profile | grep -oE '\-f.*jffs.*profile' | awk '{print $2}')
fi
fi
sed -i "/alias clash/d" $profile
sed -i "/alias crash/d" $profile
sed -i "/export CRASHDIR/d" $profile
echo "alias clash=\"$CRASHDIR/clash.sh\"" >> $profile
echo "alias crash=\"$CRASHDIR/clash.sh\"" >> $profile
echo "export CRASHDIR=\"$CRASHDIR\"" >> $profile
[ -f $CRASHDIR/.dis_startup ] && cronset "clash保守模式守护进程" || $0 start
[ -f $CRASHDIR/.dis_startup ] && cronset "保守模式守护进程" || $0 start
;;
getyaml)
getconfig