Adding default hook to truncate log files.
This commit is contained in:
parent
7caf9ed19f
commit
4c68f85487
|
@ -614,7 +614,8 @@ Set_defaults ()
|
||||||
remote-adjtime-configuration \
|
remote-adjtime-configuration \
|
||||||
disable-kexec-tools \
|
disable-kexec-tools \
|
||||||
remove-backup-files \
|
remove-backup-files \
|
||||||
remove-temporary-files}"
|
remove-temporary-files \
|
||||||
|
truncate-log-files}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
kubuntu)
|
kubuntu)
|
||||||
|
@ -631,7 +632,8 @@ Set_defaults ()
|
||||||
remove-adjtime-configuration \
|
remove-adjtime-configuration \
|
||||||
disable-kexec-tools \
|
disable-kexec-tools \
|
||||||
remove-backup-files \
|
remove-backup-files \
|
||||||
remove-temporary-files}"
|
remove-temporary-files \
|
||||||
|
truncate-log-files}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Truncate log files
|
||||||
|
for _FILE in $(find /var/log/ -type f)
|
||||||
|
do
|
||||||
|
: > ${_FILE}
|
||||||
|
done
|
Loading…
Reference in New Issue