Quellcode durchsuchen

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 vor 8 Jahren
Ursprung
Commit
8e009f29f2
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. +1
    -0
      log2ram

+ 1
- 0
log2ram Datei anzeigen

@@ -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…
Abbrechen
Speichern