diff options
author | Chris Packham <judge.packham@gmail.com> | 2015-10-14 21:34:18 +1300 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-10-18 17:31:06 +0200 |
commit | 75e38abaf7bbeb45c1311c084267b5cfd723d753 (patch) | |
tree | d1d53deae4b278136245709d0e2767f7547a756d /package/syslog-ng/S01logging | |
parent | 43d6e6caa891b7db080ac86f2e07a0c7d8dbc465 (diff) | |
download | buildroot-75e38abaf7bbeb45c1311c084267b5cfd723d753.tar.gz buildroot-75e38abaf7bbeb45c1311c084267b5cfd723d753.zip |
syslog-ng: New package
syslog-ng is an enhanced log daemon, supporting a wide range of input
and output methods: syslog, unstructured text, queueing, SQL & NoSQL.
[Thomas:
- Rewrap Config.in.help text
- Pass --pidfile option when starting syslog-ng so that its PID file
is created in /var/run/syslog-ng.pid, which allows
start-stop-daemon to actually stop syslog-ng. Without this,
S01logging was not able to stop syslog-ng.
- Pass the executable path at stop time in S01logging, so that
start-stop-daemon can check we're not incorrectly stopping
something completely different.
- Add busybox as a dependency of syslog-ng if busybox is enabled,
since we want to override Busybox's S01logging init script.
- Simplify the python condition, since python and python3 are
mutually exclusive.
- Rewrap the comment above SYSLOG_NG_FIXUP_CONFIG.]
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/syslog-ng/S01logging')
-rw-r--r-- | package/syslog-ng/S01logging | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/package/syslog-ng/S01logging b/package/syslog-ng/S01logging new file mode 100644 index 0000000000..d7c899a1e3 --- /dev/null +++ b/package/syslog-ng/S01logging @@ -0,0 +1,38 @@ +#!/bin/sh + +start() { + printf "Starting syslog-ng daemon: " + start-stop-daemon -S -q -p /var/run/syslog-ng.pid \ + -x /usr/sbin/syslog-ng -- --pidfile /var/run/syslog-ng.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping syslog-ng daemon: " + start-stop-daemon -K -q -p /var/run/syslog-ng.pid \ + -x /usr/sbin/syslog-ng + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +restart() { + stop + sleep 1 + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? |