summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status/root/usr/libexec/syslog-wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-mod-status/root/usr/libexec/syslog-wrapper')
-rwxr-xr-xmodules/luci-mod-status/root/usr/libexec/syslog-wrapper21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/luci-mod-status/root/usr/libexec/syslog-wrapper b/modules/luci-mod-status/root/usr/libexec/syslog-wrapper
new file mode 100755
index 0000000000..75af831078
--- /dev/null
+++ b/modules/luci-mod-status/root/usr/libexec/syslog-wrapper
@@ -0,0 +1,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