瀏覽代碼

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 年之前
父節點
當前提交
8e009f29f2
共有 1 個檔案被更改,包括 1 行新增0 行删除
  1. +1
    -0
      log2ram

+ 1
- 0
log2ram 查看文件

@@ -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


Loading…
取消
儲存