beautification and minor fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -83,7 +83,7 @@ if ($page == 'log' && $userinfo['change_serversettings'] == '1') {
|
||||
case \Froxlor\FroxlorLogger::LOGIN_ACTION:
|
||||
$_action = $lng['logger']['login'];
|
||||
break;
|
||||
case LOG_ERROR:
|
||||
case \Froxlor\FroxlorLogger::LOG_ERROR:
|
||||
$_action = $lng['logger']['intern'];
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -96,7 +96,7 @@ if ($page == 'log') {
|
||||
case \Froxlor\FroxlorLogger::LOGIN_ACTION:
|
||||
$_action = $lng['logger']['login'];
|
||||
break;
|
||||
case LOG_ERROR:
|
||||
case \Froxlor\FroxlorLogger::LOG_ERROR:
|
||||
$_action = $lng['logger']['intern'];
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -34,7 +34,7 @@ class HttpConfigBase
|
||||
if (Settings::Get('system.leenabled') == 1) {
|
||||
\Froxlor\FroxlorLogger::getInstanceOf()->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_INFO, 'Running Let\'s Encrypt cronjob prior to regenerating webserver config files');
|
||||
\Froxlor\Cron\Http\LetsEncrypt\AcmeSh::$no_inserttask = true;
|
||||
\Froxlor\Cron\Http\LetsEncrypt\AcmeSh::run();
|
||||
\Froxlor\Cron\Http\LetsEncrypt\AcmeSh::run(true);
|
||||
// set last run timestamp of cronjob
|
||||
\Froxlor\System\Cronjob::updateLastRunOfCron('letsencrypt');
|
||||
}
|
||||
|
||||
@@ -45,10 +45,11 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
|
||||
|
||||
public static $no_inserttask = false;
|
||||
|
||||
public static function run()
|
||||
public static function run($internal = false)
|
||||
{
|
||||
if (! defined('CRON_IS_FORCED') && ! defined('CRON_DEBUG_FLAG')) {
|
||||
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_WARNING, "Let's Encrypt cronjob is combined with regeneration of webserver configuration files.\nFor debugging purposes you can use the --debug switch and/or the --force switch to run the cron manually.");
|
||||
if (! defined('CRON_IS_FORCED') && ! defined('CRON_DEBUG_FLAG') && $internal == false) {
|
||||
//FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_WARNING, "Let's Encrypt cronjob is combined with regeneration of webserver configuration files.\nFor debugging purposes you can use the --debug switch and/or the --force switch to run the cron manually.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
self::checkInstall();
|
||||
|
||||
@@ -102,8 +102,24 @@ class MasterCron extends \Froxlor\Cron\FroxlorCron
|
||||
$cronfile::run();
|
||||
}
|
||||
}
|
||||
self::refreshUsers($tasks_cnt['jobcnt']);
|
||||
}
|
||||
|
||||
if ($tasks_cnt['jobcnt'] > 0) {
|
||||
/**
|
||||
* we have to check the system's last guid with every cron run
|
||||
* in case the admin installed new software which added a new user
|
||||
* so users in the database don't conflict with system users
|
||||
*/
|
||||
self::$cronlog->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_NOTICE, 'Checking system\'s last guid');
|
||||
\Froxlor\System\Cronjob::checkLastGuid();
|
||||
|
||||
// shutdown cron
|
||||
self::shutdown();
|
||||
}
|
||||
|
||||
private static function refreshUsers($jobcount = 0)
|
||||
{
|
||||
if ($jobcount > 0) {
|
||||
if (\Froxlor\Settings::Get('system.nssextrausers') == 1) {
|
||||
\Froxlor\Cron\System\Extrausers::generateFiles(self::$cronlog);
|
||||
}
|
||||
@@ -121,18 +137,6 @@ class MasterCron extends \Froxlor\Cron\FroxlorCron
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* we have to check the system's last guid with every cron run
|
||||
* in case the admin installed new software which added a new user
|
||||
* so users in the database don't conflict with system users
|
||||
*/
|
||||
self::$cronlog->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_NOTICE, 'Checking system\'s last guid');
|
||||
\Froxlor\System\Cronjob::checkLastGuid();
|
||||
|
||||
// shutdown cron
|
||||
self::shutdown();
|
||||
}
|
||||
|
||||
private static function init()
|
||||
{
|
||||
if (@php_sapi_name() != 'cli' && @php_sapi_name() != 'cgi' && @php_sapi_name() != 'cgi-fcgi') {
|
||||
|
||||
Reference in New Issue
Block a user