21 lines
404 B
Bash
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
|