Created
November 17, 2017 19:17
-
-
Save selbstgemacht/a329743b5743091c4779a07923629b27 to your computer and use it in GitHub Desktop.
bash script to automatically upload lets encrypt ssl certificates to hosteurope KIS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#HostEurope-Zugangsdaten | |
KUNDENNR='' | |
PASSWORD='' | |
#HostEurope-Vertrag ID und Verzeichnis ID (steht als v_ip im Link wenn man den SSL Upload im KIS aufruft | |
VERTRAGS_ID='' | |
VERZEICHNIS_ID='' | |
#lokales Unterverzeichnis im /etc/letsencrypt/live/ Ordner (-> Domainname) in dem die Zertifikate gespeichert sind | |
ETC_DOMAINVZ='' | |
curl -k --url "https://kis.hosteurope.de/?kdnummer=$KUNDENNR&passwd=$PASSWORD" \ | |
-F "v_id=$VERZEICHNIS_ID" \ | |
-F "menu=6" \ | |
-F "mode=sslupload" \ | |
-F "wp_id=$VERTRAGS_ID" \ | |
-F "submode=sslfileupload" \ | |
-F "keypass=" \ | |
-F "certfile=@/etc/letsencrypt/live/$ETC_DOMAINVZ/fullchain.pem" \ | |
-F "keyfile=@/etc/letsencrypt/live/$ETC_DOMAINVZ/privkey.pem" \ | |
-F "cafile=" \ | |
-F "sumbit=Absenden" \ | |
--url "https://kis.hosteurope.de/administration/webhosting/admin.php" \ | |
--url "https://kis.hosteurope.de/?logout=1" \ -c /dev/null >/dev/null 2>1 |
ok, das Problem habe ich gelöst, allerdings kommt gar keine Ausgabe mehr und die Daten werden nicht hochgeladen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi and thank you for providing this script.
Unfortunatelly I did not get it running and I only put in the variables which I need.
this is my error message and I hope you can help:
`sh upload_tokis.sh
<title>KIS Login</title>upload_tokis.sh: line 3: $'\r': command not found
upload_tokis.sh: line 4: $'\r': command not found
upload_tokis.sh: line 5: $'\r': command not found
upload_tokis.sh: line 7: $'\r': command not found
upload_tokis.sh: line 8: $'\r': command not found
upload_tokis.sh: line 9: $'\r': command not found
upload_tokis.sh: line 11: $'\r': command not found
upload_tokis.sh: line 12: $'\r': command not found