syslog-wrapper 267 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. . /lib/functions.sh
  3. main() {
  4. local log_file
  5. log_file="$(uci_get system @system[0] log_file "")"
  6. if [ -f "$log_file" ]; then
  7. cat "$log_file"
  8. return
  9. fi
  10. if [ -f /sbin/logread ]; then
  11. /sbin/logread -e ^
  12. else
  13. /usr/sbin/logread -e ^
  14. fi
  15. }
  16. main