samba.sh fix behavior on config change when daemon is running

This commit is contained in:
David Personette 2015-05-16 14:23:56 -04:00
parent c6a9efa924
commit 229eaceafb

View File

@ -104,7 +104,9 @@ shift $(( OPTIND - 1 ))
[[ "${TIMEZONE:-""}" ]] && timezone "$TIMEZONE" [[ "${TIMEZONE:-""}" ]] && timezone "$TIMEZONE"
if [[ $# -ge 1 && -x $(which $1 2>&-) ]]; then if ps -ef | grep -q smbd; 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"