summaryrefslogtreecommitdiff
path: root/busybox/busybox-1.00-rc1/syslog
blob: 5c46a28a9ae71c24d2f7a2ff503bf9fe1a5aec2b (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
#! /bin/sh
#
# syslog	init.d script for busybox syslogd/klogd
#		Written by Robert Griebl <sandman@handhelds.org>
#

# log to remote host
# SYSLOG_ARGS="-R remote.host"

# log to 16K shm circular buffer
SYSLOG_ARGS="-C"

set -e

case "$1" in
  start)
	echo -n "Starting syslogd/klogd: "
	start-stop-daemon -S -b -n syslogd -a /sbin/syslogd -- -n $SYSLOG_ARGS
	start-stop-daemon -S -b -n klogd -a /sbin/klogd -- -n
	echo "done"
	;;
  stop)
	echo -n "Stopping syslogd/klogd: "
	start-stop-daemon -K -n syslogd
	start-stop-daemon -K -n klogd
	echo "done"
	;;
  *)
	echo "Usage: syslog {start|stop}" >&2
	exit 1
	;;
esac

exit 0