Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | #!/bin/sh |
2 | |||||
3 | . /etc/init.d/functions | ||||
4 | |||||
5 | nice= | ||||
6 | force= | ||||
7 | pidfile= | ||||
8 | user= | ||||
9 | check= | ||||
10 | RETVAL= | ||||
11 | while [ "$1" != "${1##[-+]}" ]; do | ||||
12 | case $1 in | ||||
13 | -f) | ||||
14 | force="--force" | ||||
15 | shift | ||||
16 | ;; | ||||
17 | -n) | ||||
18 | nice=$2 | ||||
19 | shift 2 | ||||
20 | ;; | ||||
21 | -p) | ||||
22 | pidfile="--pidfile $2" | ||||
23 | shift 2 | ||||
24 | ;; | ||||
25 | -u) | ||||
26 | user="--user $2" | ||||
27 | shift 2 | ||||
28 | ;; | ||||
29 | -c) | ||||
30 | check="--check $2" | ||||
31 | shift 2 | ||||
32 | ;; | ||||
33 | *) | ||||
34 | echo "Unknown Option $1" | ||||
35 | echo "Options are:" | ||||
36 | echo "-f" | ||||
37 | echo "-p {pidfile}" | ||||
38 | echo "-n [+/-nicelevel]" | ||||
39 | echo "-u {user}" | ||||
40 | echo "-c {base}" | ||||
41 | exit 1;; | ||||
42 | esac | ||||
43 | done | ||||
44 | LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $* | ||||
45 | exit $? |