diff --git a/log2ram b/log2ram index 00031ef..344f4b2 100755 --- a/log2ram +++ b/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 diff --git a/uninstall.sh b/uninstall.sh index 7a82692..f21169e 100755 --- a/uninstall.sh +++ b/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