slackbuilds_ponce/audio/nas/rc.nasd.new
David Woodfall 359f46f7cc audio/nas: Updated for version 1.9.4.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2018-03-31 07:41:38 +07:00

39 lines
417 B
Bash

#!/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