Menu

[r10367]: / legacy / etc / rc.d / clog  Maximize  Restore  History

Download this file

51 lines (36 with data), 1.0 kB

#!/bin/sh
# Copyright (c) 2006-2009 Volker Theile (votdev@gmx.de)
# All rights reserved.

# PROVIDE: clog
# BEFORE: syslogd
# REQUIRE: FILESYSTEMS

. /etc/rc.subr

name="clog"

load_rc_config "$name"

# Defaults
clog_logdir=${clog_logdir:-"/var/log"}

# Display message
echo "Creating clog files."

# Generate circular logfiles if necessary
if [ ! -e "${clog_logdir}/system.log" ]; then
	clog -i -s 262144 "${clog_logdir}/system.log"
fi

if [ ! -e "${clog_logdir}/ftp.log" ]; then
	clog -i -s 32768 "${clog_logdir}/ftp.log"
fi

if [ ! -e "${clog_logdir}/rsyncd.log" ]; then
	clog -i -s 32768 "${clog_logdir}/rsyncd.log"
fi

if [ ! -e "${clog_logdir}/sshd.log" ]; then
	clog -i -s 32768 "${clog_logdir}/sshd.log"
fi

if [ ! -e "${clog_logdir}/lastlog" ]; then
	clog -i -s 32768 "${clog_logdir}/lastlog"
fi

if [ ! -e "${clog_logdir}/smartd.log" ]; then
	clog -i -s 32768 "${clog_logdir}/smartd.log"
fi

if [ ! -e "${clog_logdir}/daemon.log" ]; then
	clog -i -s 32768 "${clog_logdir}/daemon.log"
fi

chmod 0600 ${clog_logdir}/*.log
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.