## do the exit # CA-Variables export CADIR=/usr/share/fd-vertel-se export CLIENT=$1 export CLIENTDIR="$CLIENT"-ssl # Check $CLIENT if [ -z "$CLIENT" ] then echo "Missing name of client parameter: wget .... | bash -s [client]" exit fi echo Path ... 13 = `pwd` echo Deleting directory and files for $CLIENT echo go to CADIR: $CADIR echo go to CLIENTDIR: $CLIENTDIR cd $CADIR/$CLIENTDIR echo Path ... 23 = `pwd` # Create the file certinfo.ldif -- remove the data sudo rm certinfo.ldif sudo touch certinfo.ldif sudo chmod a+w certinfo.ldif echo """dn: cn=config delete: olcTLSCertificateFile olcTLSCertificateFile: /usr/share/fd-vertel-se/$CLIENT_PRIVKEY - delete: olcTLSCertificateKeyFile olcTLSCertificateKeyFile: /usr/share/fd-vertel-se/$CLIENT_CERT""" > certinfo.ldif sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f certinfo.ldif echo Path ... 36 = `pwd` cd $CADIR echo sudo rm -rf $CLIENTDIR sudo rm -rf $CLIENTDIR echo Path ... 40 = `pwd` #### DONE echo DONE