diff --git a/ab-openldap/backup.sh b/ab-openldap/backup.sh index 4d6fb15..d974b67 100755 --- a/ab-openldap/backup.sh +++ b/ab-openldap/backup.sh @@ -467,12 +467,12 @@ if [ $extract = 'true' ]; then # remove TLS configuration if [ "$removeTLS" = 'true' ]; then # get newest config-? file in outputLocation/restore directory - cnConfigFile=$( ls "${outputLocation%/}/restore" -t | head -n1 ) + cnConfigFile=$( ls -Adt ${outputLocation%/}/restore/config-* | head -n1 ) # remove TLS configuration entries - logInfo 'task' "Removing TLS configuration $cnConfigFile... " - sed -i -e '/^olcTLS/d' "$cnConfigFile" + logInfo 'task' "Removing TLS configuration from '$cnConfigFile'" + sed -i -e '/^olcTLS/d' "$cnConfigFile" 2>> "$logfile" # check our work - if ! grep -q '^olcTLS' "$cnConfigFile"; then + if ! grep -q '^olcTLS' "$cnConfigFile" 2>> "$logfile"; then logInfo 'done' else logInfo 'err'