From: Laurent Mazet Date: Fri, 9 Sep 2016 10:07:34 +0000 (+0200) Subject: force logrotate on boot or purge /var/log X-Git-Tag: debian_7.8.11~1 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=70a03528ea63f78a9c2ba53be33df67f16777ea3;hp=3bc777aee45d004a0ca57214d05e1570ac34435c;p=debian6500.git force logrotate on boot or purge /var/log --- diff --git a/master/etc/rc.local b/master/etc/rc.local new file mode 100644 index 0000000..9dcf833 --- /dev/null +++ b/master/etc/rc.local @@ -0,0 +1,17 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# clean /var/log +/usr/sbin/logrotate /etc/logrotate.conf --force || { find /var/log/ -type f -exec rm {} \;; reboot; } + +exit 0