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"
|
[[ "${TIMEZONE:-""}" ]] && timezone "$TIMEZONE"
|
||||||
|
|
||||||
if ps -ef | egrep -v grep | grep -q smbd; then
|
if [[ $# -ge 1 && -x $(which $1 2>&-) ]]; then
|
||||||
echo "Service already running, please restart container to apply changes"
|
|
||||||
elif [[ $# -ge 1 && -x $(which $1 2>&-) ]]; then
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
elif [[ $# -ge 1 ]]; then
|
elif [[ $# -ge 1 ]]; then
|
||||||
echo "ERROR: command not found: $1"
|
echo "ERROR: command not found: $1"
|
||||||
exit 13
|
exit 13
|
||||||
|
elif ps -ef | egrep -v grep | grep -q smbd; then
|
||||||
|
echo "Service already running, please restart container to apply changes"
|
||||||
else
|
else
|
||||||
exec ionice -c 3 smbd -FS
|
exec ionice -c 3 smbd -FS
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user