blob: 0f3ae84cb698c07e95876e2b7ca2be2f40e040aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/bin/sh
start() {
if [ -x /usr/bin/nasd ]; then
if [ -n "$(pgrep -x nasd)" ]; then
echo "Starting nasd /usr/bin/nasd"
/usr/bin/nasd :0 -aa -b
else
echo "nasd is already running"
exit 1
fi
fi
}
stop() {
pkill -x nasd
}
restart() {
stop
sleep 1
start
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
restart
;;
*)
echo "usage $0 start|stop|restart"
;;
esac
|