sview 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/view" && exec "$1/view"
  12. cd "log/logdir" || exit $?
  13. h=`ttysize h`
  14. exec tail -n $((h-1)) -F current 2>&1