Changeset View
Changeset View
Standalone View
Standalone View
head/etc/rc.d/newsyslog
#!/bin/sh | #!/bin/sh | ||||
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# PROVIDE: newsyslog | # PROVIDE: newsyslog | ||||
# REQUIRE: FILESYSTEMS mountcritremote | # REQUIRE: FILESYSTEMS mountcritremote | ||||
. /etc/rc.subr | . /etc/rc.subr | ||||
name="newsyslog" | name="newsyslog" | ||||
desc="Logfile rotation" | |||||
rcvar="newsyslog_enable" | rcvar="newsyslog_enable" | ||||
required_files="/etc/newsyslog.conf" | required_files="/etc/newsyslog.conf" | ||||
command="/usr/sbin/${name}" | command="/usr/sbin/${name}" | ||||
start_cmd="newsyslog_start" | start_cmd="newsyslog_start" | ||||
stop_cmd=":" | stop_cmd=":" | ||||
newsyslog_start() | newsyslog_start() | ||||
{ | { | ||||
check_startmsgs && echo -n 'Creating and/or trimming log files' | check_startmsgs && echo -n 'Creating and/or trimming log files' | ||||
${command} ${rc_flags} | ${command} ${rc_flags} | ||||
check_startmsgs && echo '.' | check_startmsgs && echo '.' | ||||
} | } | ||||
load_rc_config $name | load_rc_config $name | ||||
run_rc_command "$1" | run_rc_command "$1" |