svpage 316 B

12345678910111213141516171819
  1. #!/bin/sh
  2. test "$1" || {
  3. echo "Syntax: ${0##*/} SERVICE"
  4. exit 1
  5. }
  6. test x"$1" = x"${1#*/}" -a x"$1" != x"." && {
  7. # has no slashes and is not a "."
  8. cd "/var/service/$1" || exit $?
  9. set -- "."
  10. }
  11. test -x "$1/page" && exec "$1/page"
  12. cd "log/logdir" || exit $?
  13. test "$PAGER" || PAGER=less
  14. cat @* current | $PAGER