rsyslog: improved rc script, logrotate file from Gentoo. Bumprev.
--HG-- extra : convert_revision : 4d4ebf704061ff320903a47dc9aaf37bd37e4a76
This commit is contained in:
parent
cd4df07cfa
commit
0bb54ba02b
|
@ -1,8 +1,7 @@
|
||||||
/var/log/messages /var/log/dmesg /var/log/lastlog /var/log/secure {
|
/var/log/messages /var/log/dmesg /var/log/maillog /var/log/lastlog /var/log/secure {
|
||||||
missingok
|
missingok
|
||||||
sharedscripts
|
sharedscripts
|
||||||
postrotate
|
postrotate
|
||||||
kill -HUP $(cat /var/run/rsyslogd.pid 2>/dev/null) \
|
/etc/init.d/rsyslogd reload >/dev/null 2>&1 || true
|
||||||
2>/dev/null || true
|
|
||||||
endscript
|
endscript
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Config file for /etc/init.d/rsyslog
|
||||||
|
|
||||||
|
CONFIGFILE="/etc/rsyslog.conf"
|
||||||
|
PIDFILE="/var/run/rsyslogd.pid"
|
||||||
|
|
||||||
|
# Options to rsyslogd
|
||||||
|
# See rsyslogd(8) for more details
|
||||||
|
# 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
|
||||||
|
# * "-c4" tells rsyslog to _not_ run in sysklogd compatibility mode
|
||||||
|
|
||||||
|
RSYSLOGD_OPTS="-c4"
|
|
@ -1,11 +1,23 @@
|
||||||
#!/sbin/runscript
|
#!/sbin/runscript
|
||||||
|
|
||||||
pidfile=${rsyslogd_pid:-/var/run/rsyslogd.pid}
|
pidfile=${PIDFILE}
|
||||||
command=/usr/sbin/rsyslogd
|
command=/usr/sbin/rsyslogd
|
||||||
config_file=${rsyslogd_conf:-/etc/rsyslog.conf}
|
command_args="${RSYSLOGD_OPTS} -i ${pidfile} -f ${CONFIGFILE}"
|
||||||
command_args="${rsyslogd_args} -c4 -i ${pidfile} -f ${config_file}"
|
opts="reload"
|
||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
provide logger
|
provide logger
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload()
|
||||||
|
{
|
||||||
|
if [ ! -f "${PIDFILE}" ]; then
|
||||||
|
eerror "rsyslogd not running"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
ebegin "Reloading configuration and re-opening log files"
|
||||||
|
start-stop-daemon --stop --oknodo --signal HUP \
|
||||||
|
--pidfile "${PIDFILE}"
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Template file for 'rsyslog'
|
# Template file for 'rsyslog'
|
||||||
pkgname=rsyslog
|
pkgname=rsyslog
|
||||||
version=4.4.2
|
version=4.4.2
|
||||||
|
revision=1
|
||||||
distfiles="http://download.rsyslog.com/$pkgname/$pkgname-$version.tar.gz"
|
distfiles="http://download.rsyslog.com/$pkgname/$pkgname-$version.tar.gz"
|
||||||
build_style=gnu_configure
|
build_style=gnu_configure
|
||||||
configure_args="--enable-gnutls"
|
configure_args="--enable-gnutls"
|
||||||
|
@ -13,7 +14,7 @@ long_desc="
|
||||||
filtering on any message part, and fine grain output format control."
|
filtering on any message part, and fine grain output format control."
|
||||||
|
|
||||||
subpackages="$pkgname-gnutls"
|
subpackages="$pkgname-gnutls"
|
||||||
conf_files="/etc/rsyslog.conf"
|
conf_files="/etc/rsyslog.conf /etc/conf.d/rsyslogd"
|
||||||
openrc_services="rsyslogd default"
|
openrc_services="rsyslogd default"
|
||||||
|
|
||||||
Add_dependency build pkg-config
|
Add_dependency build pkg-config
|
||||||
|
@ -23,8 +24,10 @@ Add_dependency full zlib
|
||||||
|
|
||||||
post_install()
|
post_install()
|
||||||
{
|
{
|
||||||
install -d ${DESTDIR}/etc/init.d ${DESTDIR}/etc/logrotate.d
|
install -d ${DESTDIR}/etc/init.d ${DESTDIR}/etc/logrotate.d \
|
||||||
|
${DESTDIR}/etc/conf.d
|
||||||
install -m755 ${FILESDIR}/rsyslogd.rc ${DESTDIR}/etc/init.d/rsyslogd
|
install -m755 ${FILESDIR}/rsyslogd.rc ${DESTDIR}/etc/init.d/rsyslogd
|
||||||
|
install -m644 ${FILESDIR}/rsyslogd.confd ${DESTDIR}/etc/conf.d/rsyslogd
|
||||||
install -m644 ${FILESDIR}/rsyslog.conf ${DESTDIR}/etc/rsyslog.conf
|
install -m644 ${FILESDIR}/rsyslog.conf ${DESTDIR}/etc/rsyslog.conf
|
||||||
install -m644 ${FILESDIR}/rsyslog.logrotate \
|
install -m644 ${FILESDIR}/rsyslog.logrotate \
|
||||||
${DESTDIR}/etc/logrotate.d/rsyslog
|
${DESTDIR}/etc/logrotate.d/rsyslog
|
||||||
|
|
Loading…
Reference in New Issue