mongodb/templates/rotate-cert.sh

7 lines
170 B
Bash

#!/bin/sh
set -eux
/local/bin/mongosh --tlsAllowInvalidCertificates --eval <<_EOF
db.adminCommand( { rotateCertificates: 1, message: "Rotating certificates" } );
_EOF