1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-16 04:14:01 +02:00
openwrt-packages/admin/syslog-ng/files/scl/network_localhost/detect.sh
Karel Kočí 7b7d074c8d
syslog-ng: tweak shell code of network_localhost little bit
We can get rid of pipe with -n flag to sysctl.

Signed-off-by: Karel Kočí <cynerd@email.cz>
2020-09-13 11:29:43 +02:00

7 lines
224 B
Bash
Executable File

#!/bin/sh
if [ "$(sysctl -n net.ipv6.conf.lo.disable_ipv6)" = "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