Update csr.sh
This commit is contained in:
12
csr.sh
12
csr.sh
@@ -1,8 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/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 <(
|
openssl req -new -sha512 -nodes -out $HOSTNAME.$DOMAIN.csr -newkey rsa:4096 -keyout $HOSTNAME.$DOMAIN.key -config <(
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user