temporary checkin
This commit is contained in:
36
new.ca.sh
36
new.ca.sh
@@ -1,27 +1,31 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
|
||||
rootdir='/root/ssl/ca'
|
||||
rootdir='/tmp/ssl/ca'
|
||||
bindir="$(dirname ${0})"
|
||||
export rootdir
|
||||
export bindir
|
||||
|
||||
echo "If you continue, I will completely DELETE (if found):"
|
||||
echo " ${rootdir}/key"
|
||||
echo " ${rootdir}/crt"
|
||||
echo " ${rootdir}/crl"
|
||||
echo " ${rootdir}/csr"
|
||||
echo " ${rootdir}/index.txt"
|
||||
echo " ${rootdir}/serial"
|
||||
echo
|
||||
echo "To continue, type YESIAMCRAZY and hit the enter key."
|
||||
read RUCRAZY
|
||||
|
||||
if [[ "${RUCRAZY}" != 'YESIAMCRAZY' ]];
|
||||
if [[ -d "${rootdir}" ]];
|
||||
then
|
||||
echo '"IAMCRAZY" *NOT* entered. Quitting.'
|
||||
exit 1
|
||||
echo "If you continue, I will completely DELETE (if found):"
|
||||
echo " ${rootdir}/key"
|
||||
echo " ${rootdir}/crt"
|
||||
echo " ${rootdir}/crl"
|
||||
echo " ${rootdir}/csr"
|
||||
echo " ${rootdir}/index.txt"
|
||||
echo " ${rootdir}/serial"
|
||||
echo
|
||||
echo "To continue, type YESIAMCRAZY and hit the enter key."
|
||||
read RUCRAZY
|
||||
|
||||
if [[ "${RUCRAZY}" != 'YESIAMCRAZY' ]];
|
||||
then
|
||||
echo '"IAMCRAZY" *NOT* entered. Quitting.'
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Deleting CA hierarchy and creating clean..."
|
||||
@@ -136,7 +140,7 @@ echo -n "Lastly, what email address should be used for the SSL administrator? "
|
||||
read SSLADMIN
|
||||
export SSLADMIN
|
||||
|
||||
sed -i -e "s/%%TEMPLATE_ORG%%/${ORGNAME}/g ; s/%%TEMPLATE_DOMAIN%%/${ORGSITE}/g ; s/%%TEMPLATE_ROOTDIR%%/${rootdir}/g ; s/%%TEMPLATE_COUNTRY%%/${ORGCNTRY}/g ; s/%%TEMPLATE_STATE%%/${ORGSTATE}/g ; s/%%TEMPLATE_CITY%%/${ORGCITY}/g ; s/%%TEMPLATE_SSLADMIN%%/${SSLADMIN}/g" ${rootdir}/openssl.cnf
|
||||
sed -i -e "s/%%TEMPLATE_ORG%%/${ORGNAME}/g ; s/%%TEMPLATE_DOMAIN%%/${ORGSITE}/g ; s@%%TEMPLATE_ROOTDIR%%@${rootdir}@g ; s/%%TEMPLATE_COUNTRY%%/${ORGCNTRY}/g ; s/%%TEMPLATE_STATE%%/${ORGSTATE}/g ; s/%%TEMPLATE_CITY%%/${ORGCITY}/g ; s/%%TEMPLATE_SSLADMIN%%/${SSLADMIN}/g" ${rootdir}/openssl.cnf
|
||||
|
||||
NEWCA='yes'
|
||||
export NEWCA
|
||||
|
||||
Reference in New Issue
Block a user