mirror of
https://github.com/azlux/log2ram.git
synced 2023-10-10 13:37:24 +02:00
Update log2ram
This commit is contained in:
parent
a967244a73
commit
7ec00e8a95
8
log2ram
8
log2ram
@ -3,7 +3,7 @@
|
|||||||
HDD_LOG=/var/log.hdd/
|
HDD_LOG=/var/log.hdd/
|
||||||
RAM_LOG=/var/log/
|
RAM_LOG=/var/log/
|
||||||
SIZE=40M
|
SIZE=40M
|
||||||
USE_RSYN=false
|
USE_RSYNC=false
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
@ -11,7 +11,7 @@ case "$1" in
|
|||||||
mount --bind $RAM_LOG $HDD_LOG
|
mount --bind $RAM_LOG $HDD_LOG
|
||||||
mount --make-private $HDD_LOG
|
mount --make-private $HDD_LOG
|
||||||
mount -t tmpfs -o nosuid,noexec,nodev,mode=0755,size=$SIZE log2ram $RAM_LOG
|
mount -t tmpfs -o nosuid,noexec,nodev,mode=0755,size=$SIZE log2ram $RAM_LOG
|
||||||
if ["$USE_RSYN" = true]; then
|
if ["$USE_RSYNC" = true]; then
|
||||||
rsync -aXWv --delete --links $HDD_LOG $RAM_LOG
|
rsync -aXWv --delete --links $HDD_LOG $RAM_LOG
|
||||||
else
|
else
|
||||||
cp -rfup $HDD_LOG -T $RAM_LOG
|
cp -rfup $HDD_LOG -T $RAM_LOG
|
||||||
@ -19,7 +19,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
stop)
|
stop)
|
||||||
if ["$USE_RSYN" = true]; then
|
if ["$USE_RSYNC" = true]; then
|
||||||
rsync -aXWv --delete --links $RAM_LOG $HDD_LOG
|
rsync -aXWv --delete --links $RAM_LOG $HDD_LOG
|
||||||
else
|
else
|
||||||
cp -rfup $RAM_LOG -T $HDD_LOG
|
cp -rfup $RAM_LOG -T $HDD_LOG
|
||||||
@ -29,7 +29,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
write)
|
write)
|
||||||
if ["$USE_RSYN" = true]; then
|
if ["$USE_RSYNC" = true]; then
|
||||||
rsync -aXWv --delete --links $RAM_LOG $HDD_LOG
|
rsync -aXWv --delete --links $RAM_LOG $HDD_LOG
|
||||||
else
|
else
|
||||||
cp -rfup $RAM_LOG -T $HDD_LOG
|
cp -rfup $RAM_LOG -T $HDD_LOG
|
||||||
|
Loading…
Reference in New Issue
Block a user