From Botched Dolphin, 5 Years ago, written in Bash.
This paste is a reply to Re: Re: Re: save-certificate.sh from hava - 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. read -p "Nextcloud Username: " USER
  8. read -s -p "Nextcloud Password: " PWD
  9. curl -u $USER:$PWD -X MKCOL "https://c.connexeon.com/remote.php/dav/files/$USER/$CERT_NAME"
  10. for i in $CERT_NAME/* ; do
  11.   curl -u $USER:$PWD -T "${i##*/}" "https://c.connexeon.com/remote.php/dav/files/$USER/$CERT_NAME/${i##*/}"
  12. done;
  13. echo "Certificate uploaded to: https://c.connexeon.com/remote.php/dav/files/$USER/$CERT_NAME"

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

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