#!/bin/bash
openssl genrsa \
-out /etc/monit.ssl/monit_ssl_key.pem 1024
openssl req -batch -new \
-key /etc/monit.ssl/monit_ssl_key.pem \
-out /etc/monit.ssl/monit_ssl_cert.csr
openssl x509 -req -days 999 \
-in /etc/monit.ssl/monit_ssl_cert.csr \
-signkey /etc/monit.ssl/monit_ssl_key.pem \
-out /etc/monit.ssl/monit_ssl_cert.pem
