diff options
Diffstat (limited to 'examples/var_service/sview')
-rwxr-xr-x | examples/var_service/sview | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/var_service/sview b/examples/var_service/sview new file mode 100755 index 000000000..716c1079c --- /dev/null +++ b/examples/var_service/sview | |||
@@ -0,0 +1,19 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | test "$1" || { | ||
4 | echo "Syntax: ${0##*/} SERVICE" | ||
5 | exit 1 | ||
6 | } | ||
7 | |||
8 | test x"$1" = x"${1#*/}" -a x"$1" != x"." && { | ||
9 | # has no slashes and is not a "." | ||
10 | cd "/var/service/$1" || exit $? | ||
11 | set -- "." | ||
12 | } | ||
13 | |||
14 | test -x "$1/view" && exec "$1/view" | ||
15 | |||
16 | cd "log/logdir" || exit $? | ||
17 | |||
18 | h=`ttysize h` | ||
19 | exec tail -n $((h-1)) -F current 2>&1 | ||