Binding in default to IPv6 is preferable but it can be disabled in kernel and that prevents syslog-ng to start. This setup should not be that common but syslog is very important service and should survive that. This introduces new plugin defining source generator `network_localhost`. This is used instead of original network source. Signed-off-by: Karel Kočí <cynerd@email.cz>
6 lines
238 B
Bash
Executable file
6 lines
238 B
Bash
Executable file
#!/bin/sh
|
|
if [ "$(sysctl net.ipv6.conf.lo.disable_ipv6 | cut -d' ' -f 3)" = "0" ]; then
|
|
echo 'network(ip("::1") port(514) transport(udp) ip-protocol(6) )'
|
|
else
|
|
echo 'network(ip("127.0.0.1") port(514) transport(udp) ip-protocol(4) )'
|
|
fi
|