mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2026-06-21 23:43:58 +08:00
新增定时切换解析功能
This commit is contained in:
@@ -15,6 +15,7 @@ use think\facade\Config;
|
||||
use app\service\OptimizeService;
|
||||
use app\service\CertTaskService;
|
||||
use app\service\ExpireNoticeService;
|
||||
use app\service\ScheduleService;
|
||||
|
||||
class Certtask extends Command
|
||||
{
|
||||
@@ -22,7 +23,7 @@ class Certtask extends Command
|
||||
{
|
||||
// 指令配置
|
||||
$this->setName('certtask')
|
||||
->setDescription('SSL证书续签与部署、域名到期提醒、CF优选IP更新');
|
||||
->setDescription('SSL证书续签与部署、域名到期提醒、定时切换解析、CF优选IP更新');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
@@ -30,6 +31,7 @@ class Certtask extends Command
|
||||
$res = Db::name('config')->cache('configs', 0)->column('value', 'key');
|
||||
Config::set($res, 'sys');
|
||||
|
||||
(new ScheduleService())->execute();
|
||||
$res = (new OptimizeService())->execute();
|
||||
if (!$res) {
|
||||
(new CertTaskService())->execute();
|
||||
|
||||
Reference in New Issue
Block a user