actually insert task to reconfigure let's encrypt enabled services when triggered
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -134,7 +134,7 @@ class Cronjob
|
|||||||
INSERT INTO `" . TABLE_PANEL_TASKS . "` SET `type` = :type, `data` = :data
|
INSERT INTO `" . TABLE_PANEL_TASKS . "` SET `type` = :type, `data` = :data
|
||||||
");
|
");
|
||||||
|
|
||||||
if ($type == TaskId::REBUILD_VHOST || $type == TaskId::REBUILD_DNS || $type == TaskId::CREATE_FTP || $type == TaskId::REBUILD_RSPAMD || $type == TaskId::CREATE_QUOTA || $type == TaskId::REBUILD_CRON) {
|
if ($type == TaskId::REBUILD_VHOST || $type == TaskId::REBUILD_DNS || $type == TaskId::CREATE_FTP || $type == TaskId::REBUILD_RSPAMD || $type == TaskId::CREATE_QUOTA || $type == TaskId::REBUILD_CRON || $type == TaskId::UPDATE_LE_SERVICES) {
|
||||||
// 4 = bind -> if bind disabled -> no task
|
// 4 = bind -> if bind disabled -> no task
|
||||||
if ($type == TaskId::REBUILD_DNS && Settings::Get('system.bind_enable') == '0') {
|
if ($type == TaskId::REBUILD_DNS && Settings::Get('system.bind_enable') == '0') {
|
||||||
return;
|
return;
|
||||||
@@ -147,6 +147,10 @@ class Cronjob
|
|||||||
if ($type == TaskId::CREATE_QUOTA && Settings::Get('system.diskquota_enabled') == '0') {
|
if ($type == TaskId::CREATE_QUOTA && Settings::Get('system.diskquota_enabled') == '0') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 13 = let's encrypt for services -> if services empty = no task
|
||||||
|
if ($type == TaskId::UPDATE_LE_SERVICES && (Settings::Get('system.le_froxlor_enabled') == '0' || Settings::Get('system.le_renew_services') == '')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// delete previously inserted tasks if they are the same as we only need ONE
|
// delete previously inserted tasks if they are the same as we only need ONE
|
||||||
$del_stmt = Database::prepare("
|
$del_stmt = Database::prepare("
|
||||||
|
|||||||
Reference in New Issue
Block a user