make sure symfony log is rotated away if not using symfony

This commit is contained in:
Mike Macgirvin 2024-07-17 07:50:05 +10:00
parent defa20014f
commit 69760bf93a

View file

@ -6,6 +6,7 @@ use Code\Lib\ServiceClass;
use Code\Lib\Libzot;
use Code\Extend\Hook;
use Code\Lib\Time;
use Code\Storage\Stdio;
class Cron_daily implements DaemonInterface
{
@ -25,7 +26,10 @@ class Cron_daily implements DaemonInterface
if (file_exists($symfony_log)) {
rename($symfony_log, $symfony_log . '.1');
}
// if not using symfony locally, remove the rotated logs
if (!file_exists('.env') && file_exists($symfony_log . '.1')) {
unlink($symfony_log . '.1');
}
// make sure our own site record is up-to-date
Libzot::import_site(Libzot::site_info());