ldap-tools/functions.sh
2024-12-27 16:38:44 +01:00

21 lines
404 B
Bash

#!/bin/bash
function readConfig {
confDir=.
cfgFile=${confDir}/config.conf
if [ ! -f $cfgFile ]; then
echo "The conf file '$cfgFile' does not exist !"
exit 1
fi
# Read config file
. $cfgFile
}
# check if ldapsearch exist
ldapsearch_path=$(command -v ldapsearch)
if [ "$?" == "1" ]; then
echo "ldapsearch doesn't exist. Please install openldap-client package"
exit 1
fi