diff options
Diffstat (limited to 'sbin/init.d/logrotate')
-rwxr-xr-x | sbin/init.d/logrotate | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sbin/init.d/logrotate b/sbin/init.d/logrotate new file mode 100755 index 0000000..d9a9e3a --- /dev/null +++ b/sbin/init.d/logrotate @@ -0,0 +1,16 @@ +#!/bin/bash + +. `dirname $0`/functions + +option bin reserved_option /usr/sbin/logrotate +option cmdline reserved_option '$bin -s $opt_status' +option statusfile standard_option /var/lib/logrotate.status + +function fct_pre_start { + local t=$( dirname $opt_statusfile ) + if [ ! -d $t ] ; then + mkdir -p -m 755 $t || return 1 + fi +} + +load_config |