move php-sessionclean script to scripts-dir instead of install/scripts/; add cronjob calling php-sessionclean if php-fpm is enabled; remove testing-note for let's encrypt in german language file

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-02-24 08:49:36 +01:00
parent 1d7d32130a
commit 84f5de42a9
4 changed files with 9 additions and 4 deletions

View File

@@ -4,7 +4,6 @@ namespace Froxlor\Cli\Action;
use Froxlor\Database\Database;
use Froxlor\Settings;
use Froxlor\Cli\PhpSessioncleanCmd;
class PhpSessioncleanAction extends \Froxlor\Cli\Action
{

View File

@@ -106,6 +106,12 @@ class CronConfig
}
}
// php sessionclean if enabled
if ((int) Settings::Get('phpfpm.enabled') == 1) {
$cronfile .= "# Look for and purge old sessions every 30 minutes".PHP_EOL;
$cronfile .= "09,39 * * * * root " . \Froxlor\FileDir::makeCorrectFile(\Froxlor\Froxlor::getInstallDir() . "/scripts/php-sessionclean.php") . " --froxlor-dir=" . escapeshellarg(\Froxlor\Froxlor::getInstallDir()) . " 1> /dev/null" . PHP_EOL;
}
if (\Froxlor\FileDir::isFreeBSD()) {
// FreeBSD handles the cron-stuff in another way. We need to directly
// write to the crontab file as there is not cron.d/froxlor file