File: svpage

package info (click to toggle)
busybox 1%3A1.30.1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 26,768 kB
  • sloc: ansic: 182,637; sh: 8,979; cpp: 1,428; makefile: 1,023; yacc: 570; lex: 355; perl: 312; python: 109; awk: 29
file content (19 lines) | stat: -rwxr-xr-x 316 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

test "$1" || {
	echo "Syntax: ${0##*/} SERVICE"
	exit 1
}

test x"$1" = x"${1#*/}" -a x"$1" != x"." && {
	# has no slashes and is not a "."
	cd "/var/service/$1" || exit $?
	set -- "."
}

test -x "$1/page" && exec "$1/page"

cd "log/logdir" || exit $?

test "$PAGER" || PAGER=less
cat @* current | $PAGER