samba.sh fixed order of checking commandline args

This commit is contained in:
David Personette 2015-05-21 07:11:34 -04:00
parent 301f9eb78c
commit 426fd586c6

View File

@ -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