Browse Source

logrotate change

pull/76/head
StuartIanNaylor 5 years ago
parent
commit
cb07cf6aca
2 changed files with 5 additions and 4 deletions
  1. +4
    -3
      log2ram
  2. +1
    -1
      uninstall.sh

+ 4
- 3
log2ram View File

@@ -83,15 +83,16 @@ case "$1" in
stop) stop)
syncToDisk syncToDisk
invoke-rc.d rsyslog stop 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 $RAM_LOG/
umount -l $HDD_LOG/ umount -l $HDD_LOG/
if [ "$ZL2R" = true ]; then if [ "$ZL2R" = true ]; then
RAM_DEV=$(cat /sys/class/zram-control/hot_add) RAM_DEV=$(cat /sys/class/zram-control/hot_add)
if [ "$RAM_DEV" -eq "1" ];then if [ "$RAM_DEV" -eq "1" ];then
echo "$L2G_DEV" > /sys/class/zram-control/hot_remove
rmod zram 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
fi fi
invoke-rc.d rsyslog restart invoke-rc.d rsyslog restart


+ 1
- 1
uninstall.sh View File

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


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


Loading…
Cancel
Save