瀏覽代碼

logrotate change

pull/76/head
StuartIanNaylor 5 年之前
父節點
當前提交
cb07cf6aca
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. +4
    -3
      log2ram
  2. +1
    -1
      uninstall.sh

+ 4
- 3
log2ram 查看文件

@@ -83,15 +83,16 @@ case "$1" in
stop)
syncToDisk
invoke-rc.d rsyslog stop
L2G_DEV=$(df /var/log | tail -1 | awk '{ print $1 }' | tr -dc '0-9')
umount -l $RAM_LOG/
umount -l $HDD_LOG/
if [ "$ZL2R" = true ]; then
RAM_DEV=$(cat /sys/class/zram-control/hot_add)
if [ "$RAM_DEV" -eq "1" ];then
echo "$L2G_DEV" > /sys/class/zram-control/hot_remove
rmod zram
else
RAM_DEV=$(df /var/log | tail -1 | awk '{ print $1 }' | tr -dc '0-9')
echo "$RAM_DEV" > /sys/class/zram-control/hot_remove
else
echo "$L2G_DEV" > /sys/class/zram-control/hot_remove
fi
fi
invoke-rc.d rsyslog restart


+ 1
- 1
uninstall.sh 查看文件

@@ -8,7 +8,7 @@ then
rm /usr/local/bin/log2ram
rm /etc/log2ram.conf
rm /etc/cron.hourly/log2ram
rm /etc/logrotate.d/log2ram
rm /etc/logrotate.d/00_log2ram

if [ -d /var/hdd.log ]; then
rm -r /var/hdd.log


Loading…
取消
儲存