Update csr.sh

This commit is contained in:
2018-01-07 21:35:42 -05:00
parent 93f4248f0e
commit cfdee03ab7

12
csr.sh
View File

@@ -1,8 +1,14 @@
#!/bin/bash
HOSTNAME=$1
DOMAIN="home.johnhagunt.com"
#read -p 'Hostname: ' hostname
if [ $# -eq 0 ]; then
read -p 'Please enter a Hostname: ' HOSTNAME
elif [ $# -gt 0 ]; then
# do something more here
else
HOSTNAME=$1
fi
DOMAIN="home.johnhagunt.com"
openssl req -new -sha512 -nodes -out $HOSTNAME.$DOMAIN.csr -newkey rsa:4096 -keyout $HOSTNAME.$DOMAIN.key -config <(
cat <<-EOF