From 229eaceafbb9cb06d8f7549c60177d7ca0924e46 Mon Sep 17 00:00:00 2001 From: David Personette Date: Sat, 16 May 2015 14:23:56 -0400 Subject: [PATCH] samba.sh fix behavior on config change when daemon is running --- samba.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samba.sh b/samba.sh index 1fefc52..8c03c90 100755 --- a/samba.sh +++ b/samba.sh @@ -104,7 +104,9 @@ shift $(( OPTIND - 1 )) [[ "${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 "$@" elif [[ $# -ge 1 ]]; then echo "ERROR: command not found: $1"