add postrotate to ramlog
Improve armbian-ramlog. See discussion here : https://github.com/armbian/build/issues/1582
This commit is contained in:
parent
b6706ec67a
commit
62e6febab8
@ -112,6 +112,14 @@ case "$1" in
|
||||
write)
|
||||
syncToDisk
|
||||
;;
|
||||
postrotate)
|
||||
cd /var/log.hdd/
|
||||
find . -type f -print | grep -E -v "(\.gz|\.xz|\.[0-9]|armbian-ramlog)" | while IFS= read -r file
|
||||
do
|
||||
dest="/var/log/$file"
|
||||
cat $file > $dest
|
||||
done
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ${0##*/} {start|stop|write}" >&2
|
||||
exit 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user