diff options
Diffstat (limited to 'audio/rplay/files/rplayd.sh')
-rw-r--r-- | audio/rplay/files/rplayd.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/audio/rplay/files/rplayd.sh b/audio/rplay/files/rplayd.sh index ffce002a43eb..b9fbae452225 100644 --- a/audio/rplay/files/rplayd.sh +++ b/audio/rplay/files/rplayd.sh @@ -1,19 +1,20 @@ #!/bin/sh -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then echo "$0: Cannot determine the PREFIX" >&2 exit 1 fi case "$1" in start) - [ -x ${PREFIX}/sbin/rplayd ] && ( ${PREFIX}/sbin/rplayd & ) && echo -n ' rplayd' + [ -x ${PREFIX}/sbin/rplayd ] && ${PREFIX}/sbin/rplayd && echo -n ' rplayd' ;; stop) killall rplayd && echo -n ' rplayd' ;; *) echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 ;; esac |