aboutsummaryrefslogtreecommitdiff
path: root/handlers/ldap.helper.in
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2009-02-19 12:20:44 -0500
committerMicah Anderson <micah@riseup.net>2009-02-19 12:20:44 -0500
commit27a7859c42394a78c16b24f0d08ca28667bb1efa (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /handlers/ldap.helper.in
parent386c4275946520bc590428e730a9d515155436a0 (diff)
downloadbackupninja-27a7859c42394a78c16b24f0d08ca28667bb1efa.tar.gz
backupninja-27a7859c42394a78c16b24f0d08ca28667bb1efa.tar.bz2
creating a debian only branch out of what used to be a subversion repository
Diffstat (limited to 'handlers/ldap.helper.in')
-rw-r--r--handlers/ldap.helper.in90
1 files changed, 0 insertions, 90 deletions
diff --git a/handlers/ldap.helper.in b/handlers/ldap.helper.in
deleted file mode 100644
index 9251826..0000000
--- a/handlers/ldap.helper.in
+++ /dev/null
@@ -1,90 +0,0 @@
-# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
-
-HELPERS="$HELPERS ldap:ldap_database_backup"
-
-ldap_create_file() {
-while true; do
- checkBox "ldap action wizard" "check options (slapcat OR ldapsearch)" \
- "slapcat" "export ldif using slapcat" yes \
- "ldapsearch" "export ldif using ldapsearch" no \
- "compress" "compress the ldif output files" yes \
- "ssl" "use SSL (deprecated)" no \
- "tls" "use TLS extended operations (RFC2246, RFC2830)" yes
- status=$?
- compress="compress = no"
- method="method = <unset>"
- restart="restart = no"
- binddn=""
- passwordfile=""
- ssl="ssl = no"
- tls="tls = no"
- [ $status = 1 ] && return;
- result="$REPLY"
- for opt in $result; do
- case $opt in
- '"compress"') compress="compress = yes";;
- '"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
- ;;
- '"ssl"') ssl="ssl = yes";;
- '"tls"') tls="tls = yes";;
- esac
- done
- get_next_filename $configdirectory/30.ldap
- cat > $next_filename <<EOF
-$method
-$compress
-$restart
-$binddn
-$passwordfile
-$ssl
-$tls
-# backupdir = /var/backups/ldap
-# conf = /etc/ldap/slapd.conf
-# databases = all
-EOF
- chmod 600 $next_filename
- return
-done
-}
-
-ldap_wizard() {
- bdb=no
- hdb=no
- ldbm=no
- for backend in `grep -e "^backend" /etc/ldap/slapd.conf | @AWK@ '{print $2}'`; do
- if [ "$backend" == "bdb" ]; then
- bdb=yes
- elif [ "$backend" == "hdb" ]; then
- hdb=yes
- elif [ "$backend" == "ldbm" ]; then
- ldbm=yes
- fi
- done
-
- if [ "$bdb" == "yes" -o "$hdb" == "yes" ]; then
- if [ "$ldbm" == "no" ]; then
- msgBox "ldap action wizard" "It looks like the backend in your slapd.conf is set to BDB or HDB. If this is not the case, exit this wizard! From this point on, we will assume BDB or HDB backend, which might have disasterious consequences if this is incorrect."
- _RESTART=no
- ldap_create_file
- fi
- elif [ "$ldbm" == "yes" ]; then
- msgBox "ldap action wizard" "It looks like the backend in your slapd.conf is set to LDBM. Because of this, you will have less options (because it is not safe to use slapcat while slapd is running LDBM)."
- _RESTART=yes
- ldap_create_file
- else
- msgBox "ldap action wizard" "I couldn't find any supported backend in your slapd.conf. Bailing out."
- return
- fi
-}