From hava, 5 Years ago, written in Bash.
This paste is a reply to Re: Re: Re: Re: save-certificate.sh from Botched Dolphin - view diff
Embed
  1. #!/bin/bash
  2. read -p "Certificate name (e.g. connexeon.com-2017): " CERT_NAME
  3. cd $CERT_NAME
  4. echo "Certificate (press Ctrl+D when done): " && cat > $CERT_NAME.cer
  5. echo "Root Certificate (press Ctrl+D when done): " && cat > $CERT_NAME-CA.cer
  6. echo "Intermediate Certificate (press Ctrl+D when done): " && cat >> $CERT_NAME-CA.cer
  7. openssl pkcs12 -export -in $CERT_NAME.cer -inkey $CERT_NAME.private.key -out $CERT_NAME.pfx -certfile $CERT_NAME-CA.cer
  8. read -p "Nextcloud Username: " USER
  9. read -s -p "Nextcloud Password: " PWD
  10. curl -u $USER:$PWD -X MKCOL "https://c.connexeon.com/remote.php/dav/files/$USER/$CERT_NAME"
  11. for i in $CERT_NAME/* ; do
  12.   curl -u $USER:$PWD -T "${i##*/}" "https://c.connexeon.com/remote.php/dav/files/$USER/$CERT_NAME/${i##*/}"
  13. done;
  14. echo "Certificate uploaded to: https://c.connexeon.com/remote.php/dav/files/$USER/$CERT_NAME"

Replies to Re: Re: Re: Re: Re: save-certificate.sh rss

Title Name Language When
Re: Re: Re: Re: Re: Re: save-certificate.sh hava bash 5 Years ago.