mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:35:19 +00:00
make sure symfony log is rotated away if not using symfony
This commit is contained in:
parent
defa20014f
commit
69760bf93a
1 changed files with 5 additions and 1 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in a new issue