diff options
author | David Woodfall <dave@dawoodfall.net> | 2018-03-27 15:10:34 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-03-31 07:41:38 +0700 |
commit | 359f46f7cca5c38da32e9054973e6b37c3e3f417 (patch) | |
tree | 8874d736c59e09fdd59eecd4ddf48bd238067339 /audio/nas/rc.nasd.new | |
parent | f8f17629245bc12d203a0f99caa07e76f6c04d19 (diff) | |
download | slackbuilds-359f46f7cca5c38da32e9054973e6b37c3e3f417.tar.gz |
audio/nas: Updated for version 1.9.4.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/nas/rc.nasd.new')
-rw-r--r-- | audio/nas/rc.nasd.new | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/audio/nas/rc.nasd.new b/audio/nas/rc.nasd.new index 182b9c14c5..0f3ae84cb6 100644 --- a/audio/nas/rc.nasd.new +++ b/audio/nas/rc.nasd.new @@ -1,38 +1,39 @@ #!/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 + 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() { - killall nasd + pkill -x nasd } restart() { - stop - sleep 1 - start + stop + sleep 1 + start } case "$1" in - 'start') - start - ;; - 'stop') - stop - ;; - 'restart') - restart - ;; - *) - echo "usage $0 start|stop|restart" ;; + 'start') + start + ;; + 'stop') + stop + ;; + 'restart') + restart + ;; + *) + echo "usage $0 start|stop|restart" + ;; esac |