#!/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}'