Skip to content
Snippets Groups Projects
Commit c24314f7 authored by Jakub Jirutka's avatar Jakub Jirutka :flag_ua:
Browse files

main/rsyslog: modernize init script

parent e5d012de
No related merge requests found
...@@ -32,7 +32,6 @@ install="$pkgname.post-upgrade" ...@@ -32,7 +32,6 @@ install="$pkgname.post-upgrade"
subpackages="$pkgname-doc $pkgname-dbg" subpackages="$pkgname-doc $pkgname-dbg"
source="https://www.rsyslog.com/files/download/$pkgname/$pkgname-$pkgver.tar.gz source="https://www.rsyslog.com/files/download/$pkgname/$pkgname-$pkgver.tar.gz
$pkgname.initd $pkgname.initd
$pkgname.confd
$pkgname.logrotate $pkgname.logrotate
$pkgname.conf $pkgname.conf
musl-fix.patch musl-fix.patch
...@@ -94,7 +93,6 @@ package() { ...@@ -94,7 +93,6 @@ package() {
rm -f "$pkgdir"/usr/lib/rsyslog/imdiag.so rm -f "$pkgdir"/usr/lib/rsyslog/imdiag.so
install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
install -m644 -D "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname install -m644 -D "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
install -m644 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf install -m644 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf
} }
...@@ -120,8 +118,7 @@ _plugin() { ...@@ -120,8 +118,7 @@ _plugin() {
} }
sha512sums="3d5d4f92e37ad9bf3767d5d7fc87fcb7956656f676a9495c78abd12fe9072ec8763b50543b198308a71d5d919721fb9b84b6725dd83a9d9b8a1639d81382c0dd rsyslog-8.40.0.tar.gz sha512sums="3d5d4f92e37ad9bf3767d5d7fc87fcb7956656f676a9495c78abd12fe9072ec8763b50543b198308a71d5d919721fb9b84b6725dd83a9d9b8a1639d81382c0dd rsyslog-8.40.0.tar.gz
9a4b184076a82e0899da79ab3749e1c67eac03f36c4460d34ed0385f4a3ffad53681a1cc25dd514e835c9399a9abd01c235743535ad549d5be7f66d9e127b9dc rsyslog.initd bcd63c8df2ac63b80f3cb51ba7f544988df6cd875f4e81020e762dff30d7537f21b72c95a4b1c08baf15f4ed5f03defbf3f061673aabada5841f45ab9f579374 rsyslog.initd
a4d969671800227129be870b0318961b79d16365663754111a136734bbf7005abd4da24853dfdc07b3b6691ab5a7b215f0ac6c19022b4c5c8dab06165a42431b rsyslog.confd
d54377ddf39197656811a84272568ea761f984e19dd04fc54f372dd04a9244e66d02b26ab33073d0344d054f031660ec611f3c7a18c266e7b68cef5e2c47f06f rsyslog.logrotate d54377ddf39197656811a84272568ea761f984e19dd04fc54f372dd04a9244e66d02b26ab33073d0344d054f031660ec611f3c7a18c266e7b68cef5e2c47f06f rsyslog.logrotate
3bcd58b222eb7f4d8a42a0643cacb6ab44790f90c9bd550678e002bc19863d5d6a7341e5e5ba0b9292f85c6c04cd5cc42d174acdc63e8ba22022620db10f2b9b rsyslog.conf 3bcd58b222eb7f4d8a42a0643cacb6ab44790f90c9bd550678e002bc19863d5d6a7341e5e5ba0b9292f85c6c04cd5cc42d174acdc63e8ba22022620db10f2b9b rsyslog.conf
04f1c8060b9439fe25f9a4291697c577fb3d540aefcd67ed6d63d416c1dd0306fa68ae89745af2b4dc2e288d46aadd9c7a96ccfaaf3a146d9d76bd3433e3c1a5 musl-fix.patch 04f1c8060b9439fe25f9a4291697c577fb3d540aefcd67ed6d63d416c1dd0306fa68ae89745af2b4dc2e288d46aadd9c7a96ccfaaf3a146d9d76bd3433e3c1a5 musl-fix.patch
......
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.confd,v 1.1 2010/10/21 07:38:29 dev-zero Exp $
# Configuration file
CONFIGFILE="/etc/rsyslog.conf"
# PID file
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
# * "-c5" tells rsyslog to _not_ run in sysklogd compatibility mode
RSYSLOG_OPTS=""
#!/sbin/openrc-run #!/sbin/openrc-run
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.initd,v 1.1 2010/10/21 07:38:29 dev-zero Exp $
extra_started_commands="reload" extra_started_commands="reload"
depend() { description_reload="Reload the configuration and re-open log files"
need clock hostname localmount
provide logger
}
start() { : ${cfgfile:=${CONFIGFILE:="/etc/rsyslog.conf"}}
ebegin "Starting rsyslogd"
start-stop-daemon \
--start --quiet --exec /usr/sbin/rsyslogd \
-- ${RSYSLOG_OPTS} -i "${PIDFILE}" -f "${CONFIGFILE}"
eend $?
}
stop() { pidfile="/run/$RC_SVCNAME.pid"
ebegin "Stopping rsyslogd" command="/usr/sbin/rsyslogd"
start-stop-daemon \ command_args="-i $pidfile -f $cfgfile ${command_args:-$RSYSLOG_OPTS}"
--stop --quiet \
--pidfile "${PIDFILE}" required_files="$cfgfile"
eend $?
depend() {
need hostname localmount
use clock
before net
provide logger
} }
reload() { reload() {
if [ ! -f "${PIDFILE}" ]; then ebegin "Reloading configuration and re-opening log files"
eerror "rsyslogd not running" start-stop-daemon --signal HUP --pidfile "$pidfile"
return 1
fi
ebegin "Re-opening rsyslogd log files"
start-stop-daemon --stop --signal HUP \
--pidfile "${PIDFILE}"
eend $? eend $?
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment