Bladeren bron

Remove log2ram log on startup.

Since the normal log2ram log isn't in /var/log, it won't be handled by
logrotate, so it should be removed on startup to prevent it from
growing indefinitely.

We should also figure out some way to let it be processed by
logrotate, but that'd be really tricky to do well.  Maybe just kludge
it by removing all but the last 10 lines if the file is greater than
SIZE?
pull/9/head
Nick Daly 8 jaren geleden
bovenliggende
commit
8e009f29f2
1 gewijzigde bestanden met toevoegingen van 1 en 0 verwijderingen
  1. +1
    -0
      log2ram

+ 1
- 0
log2ram Bestand weergeven

@@ -33,6 +33,7 @@ syncFromDisk () {
case "$1" in
start)
[ -d $HDD_LOG ] || mkdir $HDD_LOG
rm $LOG2RAM_LOG
mount --bind $RAM_LOG $HDD_LOG
mount --make-private $HDD_LOG
mount -t tmpfs -o nosuid,noexec,nodev,mode=0755,size=$SIZE log2ram $RAM_LOG


Laden…
Annuleren
Opslaan