diff options
author | David Woodfall <dave@dawoodfall.net> | 2013-02-10 10:25:51 -0500 |
---|---|---|
committer | dsomero <xgizzmo@slackbuilds.org> | 2013-02-10 10:25:51 -0500 |
commit | 58f15a4eab5f0f40c94092be086f1711ffa59f63 (patch) | |
tree | 177805f586dbf8e7b6d8094cbefa97a7cd769893 /audio/nas/rc.nasd.new | |
parent | 65dc4c31b379c50a3b4036bd4c67ef9c0394361f (diff) | |
download | slackbuilds-58f15a4eab5f0f40c94092be086f1711ffa59f63.tar.gz |
audio/nas: Minor fixes, added rc.* file.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'audio/nas/rc.nasd.new')
-rw-r--r-- | audio/nas/rc.nasd.new | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/audio/nas/rc.nasd.new b/audio/nas/rc.nasd.new new file mode 100644 index 0000000000..182b9c14c5 --- /dev/null +++ b/audio/nas/rc.nasd.new @@ -0,0 +1,38 @@ +#!/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 + |