summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status/root/usr/libexec/syslog-wrapper
blob: 75af83107808cebdda972e1810c01eedeb01439c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

. /lib/functions.sh

main() {
	local log_file

	log_file="$(uci_get system @system[0] log_file "")"
	if [ -f "$log_file" ]; then
		cat "$log_file"
		return
	fi

	if [ -f /sbin/logread ]; then
		/sbin/logread -e ^
	else
		/usr/sbin/logread -e ^
	fi
}

main