blob: 85e87d1fb5f268b02a6636364bd1f38d9397700b (
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
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/busybox-sysklogd/files/busybox-sysklogd.initd,v 1.1 2012/08/21 12:44:33 sbriesen Exp $
depend() {
need clock hostname
provide logger
}
start() {
local retval=0 daemon="busybox syslogd"
ebegin "Starting busybox-sysklogd"
start-stop-daemon --start --quiet --exec /bin/busybox syslogd --pidfile /var/run/syslogd.pid -- ${SYSLOGD_OPTS}
retval=${?}
if [ ${retval} -eq 0 ]; then
daemon="busybox klogd"
start-stop-daemon --start --quiet --exec /bin/busybox klogd -- ${KLOGD_OPTS}
retval=${?}
if [ ${retval} -ne 0 ]; then
start-stop-daemon --stop --retry 15 --quiet --exec /bin/busybox syslogd --pidfile /var/run/syslogd.pid
fi
fi
eend ${retval} "Failed to start ${daemon}"
}
stop() {
local retval=0 daemon="busybox klogd"
ebegin "Stopping busybox-sysklogd"
start-stop-daemon --stop --retry 15 --quiet --exec /bin/busybox klogd
retval=${?}
if [ ${retval} -eq 0 ]; then
daemon="busybox syslogd"
start-stop-daemon --stop --retry 15 --quiet --exec /bin/busybox syslogd --pidfile /var/run/syslogd.pid
retval=${?}
fi
eend ${retval} "Failed to stop ${daemon}"
}
|