From 426fd586c65be24ee27160a0834851b499df0250 Mon Sep 17 00:00:00 2001 From: David Personette Date: Thu, 21 May 2015 07:11:34 -0400 Subject: [PATCH] samba.sh fixed order of checking commandline args --- samba.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samba.sh b/samba.sh index b105d3e..dbce434 100755 --- a/samba.sh +++ b/samba.sh @@ -104,13 +104,13 @@ shift $(( OPTIND - 1 )) [[ "${TIMEZONE:-""}" ]] && timezone "$TIMEZONE" -if ps -ef | egrep -v grep | grep -q smbd; then - echo "Service already running, please restart container to apply changes" -elif [[ $# -ge 1 && -x $(which $1 2>&-) ]]; then +if [[ $# -ge 1 && -x $(which $1 2>&-) ]]; then exec "$@" elif [[ $# -ge 1 ]]; then echo "ERROR: command not found: $1" exit 13 +elif ps -ef | egrep -v grep | grep -q smbd; then + echo "Service already running, please restart container to apply changes" else exec ionice -c 3 smbd -FS fi