service - svc - Simple service scripts and examples, to be used everywhere.
(HTM) git clone git://r-36.net/svc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
service (345B)
---
1 #!/bin/sh
2
3 if [ $# -lt 2 ];
4 then
5 printf "usage: %s [start|stop|restart] service\n" "$(basename "$0")" \
6 >&2
7 exit 1
8 fi
9
10 cmd="$1"
11 service="$2"
12
13 case "$cmd" in
14 sta*)
15 svc -s "$service"
16 ;;
17 sto*)
18 svc -k "$service"
19 ;;
20 r*)
21 svc -r "$service"
22 ;;
23 *)
24 printf "usage: %s [start|stop|restart] service\n" "$(basename "$0")" \
25 >&2
26 exit 1
27 ;;
28 esac
29