aboutsummaryrefslogtreecommitdiffstats
path: root/main/rsyslog/rsyslog.initd
blob: f870ba3b2b0c06966d5bd61412eb5d3368257f9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/sbin/openrc-run

extra_started_commands="reload"

description_reload="Reload the configuration and re-open log files"

: ${cfgfile:=${CONFIGFILE:="/etc/rsyslog.conf"}}

pidfile="/run/$RC_SVCNAME.pid"
command="/usr/sbin/rsyslogd"
command_args="-i $pidfile -f $cfgfile ${command_args:-$RSYSLOG_OPTS}"

required_files="$cfgfile"

depend() {
	need hostname localmount
	use clock
	before net
	provide logger
}

reload() {
	ebegin "Reloading configuration and re-opening log files"
	start-stop-daemon --signal HUP --pidfile "$pidfile"
	eend $?
}