diff --git a/ab-openldap/ab-openldap.sh b/ab-openldap/ab-openldap.sh index a262c7a..c375334 100755 --- a/ab-openldap/ab-openldap.sh +++ b/ab-openldap/ab-openldap.sh @@ -66,7 +66,7 @@ scriptHelp () { printf "\n" textblock "${bold}Usage: $scriptName [parameters]${norm}" printf "\n" - textblock "This is a simple helper script so you can avoid lengthy typing when working with the openLDAP container. The script reads the contents of 'ab-openldap.params' and constructs various 'docker run' commands based on that file. The biggest timesaver is working with certificates. If they are specified in the '.params' file, the script will automatically bind-mount them so openLDAP starts in 'TLS required' mode." + textblock "This is a simple helper script so you can avoid lengthy typing when working with the openLDAP container. The script reads the contents of '${scriptName%.*}.params' and constructs various 'docker run' commands based on that file. The biggest timesaver is working with certificates. If they are specified in the '.params' file, the script will automatically bind-mount them so openLDAP starts in 'TLS required' mode." printf "\n" textblock "If you run the script with no parameters, it will execute the container 'normally': Run in detached mode with openLDAP automatically launched and logging to stdout. If you specified certificates, openLDAP will require a TLS connection. All modes of operation allow you to enter the container and connect directly using UNIX sockets also." printf "\n" @@ -117,13 +117,13 @@ if [ ! "$( id -u )" -eq 0 ]; then fi # does the params file exist? -if [ ! -f "./ab-openldap.params" ]; then - consoleError '3' "Cannot find 'ab-openldap.params' file in the same directory as this script." +if [ ! -f "${scriptName%.*}.params" ]; then + consoleError '3' "Cannot find '${scriptName%.*}.params' file in the same directory as this script." exit 3 fi # read .params file -. ./ab-openldap.params +. ./${scriptName%.*}.params # process startup parameters while [ $# -gt 0 ]; do