depot/ops/raritan/ssl-renew/deploy.sh

15 lines
590 B
Bash
Raw Normal View History

2021-07-17 01:33:01 +00:00
#!/bin/sh
set -euo pipefail
@curl@/bin/curl -k \
--user "${RARITAN_USERNAME}:${RARITAN_PASSWORD}" \
-F cert_file=@${LEGO_CERT_PATH} \
-F key_file=@${LEGO_CERT_KEY_PATH} \
"https://${RARITAN_IP}/cgi-bin/server_ssl_cert_upload.cgi"
@curl@/bin/curl -k \
--user "${RARITAN_USERNAME}:${RARITAN_PASSWORD}" \
"https://${RARITAN_IP}/bulk" \
-H 'Content-Type: application/json; charset=UTF-8' \
--data-binary '{"jsonrpc":"2.0","method":"performBulk","params":{"requests":[{"rid":"/server_ssl_cert","json":{"jsonrpc":"2.0","method":"installPendingKeyPair","params":null,"id":1}}]},"id":2}'