#!/bin/bash
sudo openssl x509 -req -days 512 -in server.csr -signkey server.key -out server.crt
sudo cp server.crt /etc/ssl/certs
sudo cp server.key /etc/ssl/private
# to generate an updated certificate:
# sudo openssl ca -config /etc/openssl.cnf -policy policy_anything -out newcert.pem -infiles newreq.pem -startdate [now] -enddate [previous enddate+512days]
exit	$?


syntax highlighted by Code2HTML, v. 0.9.1