samba.sh fixed order of checking commandline args
This commit is contained in:
parent
301f9eb78c
commit
426fd586c6
6
samba.sh
6
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
|
||||
|
Loading…
Reference in New Issue
Block a user