Commit 75e38aba authored by Chris Packham's avatar Chris Packham Committed by Thomas Petazzoni
Browse files

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: default avatarChris Packham <judge.packham@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 43d6e6ca
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1519,6 +1519,7 @@ endif
	source "package/swupdate/Config.in"
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
	source "package/sysklogd/Config.in"
	source "package/syslog-ng/Config.in"
endif
	source "package/systemd/Config.in"
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+19 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_SYSLOG_NG
	bool "syslog-ng"
	select BR2_PACKAGE_EVENTLOG
	select BR2_PACKAGE_LIBGLIB2
	select BR2_PACKAGE_PCRE
	select BR2_PACKAGE_OPENSSL
	depends on BR2_USE_WCHAR # glib2
	depends on BR2_TOOLCHAIN_HAS_THREADS
	depends on BR2_USE_MMU # fork()
	help
	  syslog-ng is an enhanced log daemon, supporting a wide range
	  of input and output methods: syslog, unstructured text,
	  queueing, SQL & NoSQL

	  https://syslog-ng.org/

comment "syslog-ng needs a toolchain w/ wchar, threads"
	depends on BR2_USE_MMU
	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+38 −0
Original line number Diff line number Diff line
#!/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 $?
+16 −0
Original line number Diff line number Diff line
@version: 3.7

source s_sys {
	file("/proc/kmsg" program_override("kernel"));
	unix-stream ("/dev/log");
	internal();
};

destination d_all {
	file("/var/log/messages");
};

log {
	source(s_sys);
	destination(d_all);
};
+2 −0
Original line number Diff line number Diff line
# Locally computed
sha256 4c19841b9079b377cd814b1e6ebbf273af41d04d51c648f4c31f19bfadc20220  syslog-ng-3.7.1.tar.gz
Loading