remove unneeded let's encrypt settings; self-update acme.sh only once a day

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-02-17 20:36:18 +01:00
parent 5c36b79277
commit 2273a11978
2 changed files with 11 additions and 20 deletions

View File

@@ -149,24 +149,6 @@ return array(
),
'save_method' => 'storeSettingField'
),
'system_letsencryptcountrycode' => array(
'label' => $lng['serversettings']['letsencryptcountrycode'],
'settinggroup' => 'system',
'varname' => 'letsencryptcountrycode',
'type' => 'string',
'string_emptyallowed' => false,
'default' => 'DE',
'save_method' => 'storeSettingField'
),
'system_letsencryptstate' => array(
'label' => $lng['serversettings']['letsencryptstate'],
'settinggroup' => 'system',
'varname' => 'letsencryptstate',
'type' => 'string',
'string_emptyallowed' => false,
'default' => 'Hessen',
'save_method' => 'storeSettingField'
),
'system_letsencryptchallengepath' => array(
'label' => $lng['serversettings']['letsencryptchallengepath'],
'settinggroup' => 'system',

View File

@@ -332,7 +332,16 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
private static function checkUpgrade()
{
$lastcheck = \Froxlor\FileDir::makeCorrectFile(dirname(self::$acmesh) . '/.froxlor.lastupdate');
if (! file_exists($lastcheck)) {
file_put_contents($lastcheck, time());
}
$updatets = file_get_contents($lastcheck);
if ((int) trim($updatets) < (time() - 24 * 60 * 60)) {
$acmesh_result = \Froxlor\FileDir::safe_exec(self::$acmesh . " --upgrade");
FroxlorLogger::getInstanceOf()->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_INFO, "Checking for LetsEncrypt client upgrades before renewing certificates:\n" . implode("\n", $acmesh_result));
file_put_contents($lastcheck, time());
}
}
}