Masato Taruishi
taru****@users*****
2004年 9月 22日 (水) 19:53:07 JST
=================================================================== RCS file: ultrapossum/ultrapossum-server.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ultrapossum/ultrapossum-server.in 2004/09/22 04:18:44 1.2 +++ ultrapossum/ultrapossum-server.in 2004/09/22 10:53:07 1.3 @@ -8,5 +8,39 @@ PATH=$bindir:$sbindir:$PATH export PATH -exec $pkgdatadir/module.d/server/startup "$@" + +usage() { + echo "Usage: $0 [-v] <start|stop>" +} + +arg() { + case "x$1" in + xstart|xstop) + return 0 + ;; + x*) + usage + exit 1 + ;; + esac +} + +case "x$1" in + x-h) + usage + exit 0 + ;; + x-v) + shift + arg "$@" + exec $pkgdatadir/module.d/server/startup "$@" + ;; + x*) + arg "$@" + if ! $pkgdatadir/module.d/server/startup "$@" > /dev/null 2> /dev/null + then + echo "E: failed to start ultrapossum-server. use -v to see the detail." 1>&2 + fi + ;; +esac