Mercurial > repos > other > usr-local-bin
view make-certificate @ 10:4158847b0f18
Back up additional websites that are in Mercurial
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 31 Aug 2016 17:20:08 +0100 |
parents | 14c88dd76d53 |
children | b8c7a89c4ebd |
line wrap: on
line source
#! /bin/bash set -e if [ $# -ne 1 ]; then echo "Usage: $0 <key-name>" exit 1 fi if [ ! -d ~/Websites/certs/ ]; then echo "~/Websites/certs/ didn't exist - can't create certs" exit 1 fi pushd ~/Websites/certs/ openssl req -nodes -new -keyout $1.key -out $1.csr -subj "/C=GB/ST=Worcestershire/O=$1/CN=$1" openssl x509 -req -days 365 -in $1.csr -CA ~/.ssh/CA/ca.crt -CAkey ~/.ssh/CA/ca.key -CAserial ~/.ssh/CA/ca.srl -out $1.crt popd