# /etc/conf.d/rsyslog
# Configuration file
-RSYSLOG_CONFIGFILE="/etc/rsyslog.conf"
+#RSYSLOG_CONFIGFILE="/etc/rsyslog.conf"
# PID file
# If you should ever change this, remember to update
# "/etc/logrotate.d/rsyslog", too.
-RSYSLOG_PIDFILE="/run/rsyslogd.pid"
+#RSYSLOG_PIDFILE="/run/rsyslogd.pid"
# You can use this configuration option to pass additional options to the
# start-stop-daemon, see start-stop-daemon(8) for more details.
# Per default we wait 1000ms after we have started the service to ensure
# that the daemon is really up and running.
-RSYSLOG_SSDARGS="--wait 1000"
+#RSYSLOG_SSDARGS="--wait 1000"
# The termination timeout (start-stop-daemon parameter "retry") ensures
# that the service will be terminated within a given time (60 + 5 seconds
# per default) when you are stopping the service.
# You need to increase the value when you are working with a large queue.
# See http://www.rsyslog.com/doc/queues.html for further information.
-RSYSLOG_TERMTIMEOUT="TERM/60/KILL/5"
+#RSYSLOG_TERMTIMEOUT="TERM/60/KILL/5"
# Options to rsyslogd
# Notes:
# * Do not specify another PIDFILE but use the variable above to change the location
# * Do not specify another CONFIGFILE but use the variable above to change the location
-RSYSLOG_OPTS=""
+#RSYSLOG_OPTS=""
#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
RSYSLOG_CONFIGFILE=${RSYSLOG_CONFIGFILE:-"/etc/rsyslog.conf"}
RSYSLOG_PIDFILE=${RSYSLOG_PIDFILE:-"/run/rsyslogd.pid"}
+RSYSLOG_SSDARGS=${RSYSLOG_SSDARGS:-"--wait 1000"}
+RSYSLOG_TERMTIMEOUT=${RSYSLOG_TERMTIMEOUT:-"TERM/60/KILL/5"}
+RSYSLOG_OPTS=${RSYSLOG_OPTS:-""}
command="/usr/sbin/rsyslogd"
-command_args="${RSYSLOG_OPTS} -f ${RSYSLOG_CONFIGFILE} -i ${RSYSLOG_PIDFILE}"
+command_args="${RSYSLOG_OPTS} -f \"${RSYSLOG_CONFIGFILE}\" -i \"${RSYSLOG_PIDFILE}\""
start_stop_daemon_args="${RSYSLOG_SSDARGS}"
pidfile="${RSYSLOG_PIDFILE}"
retry="${RSYSLOG_TERMTIMEOUT}"
}
stop_post() {
- rm -f ${RSYSLOG_PIDFILE}
+ if [ -f "${RSYSLOG_PIDFILE}" ]; then
+ vebegin "Removing stale PID file"
+ rm --force "${RSYSLOG_PIDFILE}"
+ veend $?
+ fi
}
configtest() {
- # This will currently only detect fatal errors
- # See https://github.com/rsyslog/rsyslog/issues/79
-
- local _test_command="${command} -N 999 -f ${RSYSLOG_CONFIGFILE}"
+ local _command_args="-N 999 -f \"${RSYSLOG_CONFIGFILE}\""
local _retval=0
ebegin "Checking rsyslogd's configuration"
- ${_test_command} >/dev/null 2>&1
+ eval ${command} ${_command_args} >/dev/null 2>&1
_retval=$?
if [ ${_retval} -ne 0 ]; then
- ${_test_command}
+ eval ${command} ${_command_args}
fi
eend ${_retval} "failed, please correct errors above"