X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=handlers%2Fldap.helper;fp=handlers%2Fldap.helper;h=44b08cb07a68ec3c039b57d160d8428d1ebef795;hb=4c8e2839949be4603fbb8fb9e7a7e536e59c1dc4;hp=0000000000000000000000000000000000000000;hpb=2046272df5e3efeb8c6174b77c807ed40a2e3bd1;p=matthijs%2Fupstream%2Fbackupninja.git diff --git a/handlers/ldap.helper b/handlers/ldap.helper new file mode 100644 index 0000000..44b08cb --- /dev/null +++ b/handlers/ldap.helper @@ -0,0 +1,75 @@ + +ldap_create_file() { +while true; do + checkBox "ldap action wizard" "check options (slapcat OR ldapsearch)" \ + "slapcat" "export ldif using slapcat" on \ + "ldapsearch" "export ldif using ldapsearch" off \ + "compress" "compress the ldif output files" on + status=$? + compress="compress = off" + method="method = " + restart="restart = no" + binddn="" + passwordfile="" + [ $status = 1 ] && return; + result="$REPLY" + for opt in $result; do + case $opt in + '"compress"') compress="compress = on";; + '"slapcat"') + method="method = slapcat" + [ "$_RESTART" == "yes" ] && restart="restart = yes" + ;; + '"ldapsearch"') + method="method = ldapsearch" + inputBox "ldap action wizard" "ldapsearch requires authentication. Specify here what password file to use. It must have the password with no trailing return and it should not be world readable." + [ $? = 1 ] && return + passwordfile="passwordfile = $REPLY" + inputBox "ldap action wizard" "ldapsearch requires authentication. Specify here what DN to bind as:" + [ $? = 1 ] && return + binddn="binddn = $REPLY" + require_packages ldap-utils + ;; + esac + done + get_next_filename $configdirectory/30.ldap + cat > $next_filename <