mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
39 lines
512 B
Text
39 lines
512 B
Text
|
#!/bin/sh
|
||
|
|
||
|
start() {
|
||
|
if [ -x /usr/bin/nasd ]; then
|
||
|
if [ -n "$(pgrep nasd)" ]; then
|
||
|
echo "Starting nasd /usr/bin/nasd"
|
||
|
/usr/bin/nasd :0 -aa -b
|
||
|
else
|
||
|
echo "nasd already running"
|
||
|
exit 1
|
||
|
fi
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
stop() {
|
||
|
killall nasd
|
||
|
}
|
||
|
|
||
|
restart() {
|
||
|
stop
|
||
|
sleep 1
|
||
|
start
|
||
|
}
|
||
|
|
||
|
case "$1" in
|
||
|
'start')
|
||
|
start
|
||
|
;;
|
||
|
'stop')
|
||
|
stop
|
||
|
;;
|
||
|
'restart')
|
||
|
restart
|
||
|
;;
|
||
|
*)
|
||
|
echo "usage $0 start|stop|restart" ;;
|
||
|
esac
|
||
|
|