#!/bin/bash
sed -i /etc/pki/tls/openssl.cnfcd /etc/pki/CAopenssl genrsa 1024 > private/cakey.pemecho "CNHNZZLinuxTech" | openssl req -new -x509 -key private/cakey.pem -out cacert.pem -days 3650mkdir certs newcerts crLtouch index.txt serialecho 01 > serialread -p "Please input your service:" SERVICE
mkdir -pv /etc/$SERVICE/sslcd /etc/$SERVICE/sslopenssl genrsa 1024 > $SERVICE.keyecho "CNHN ZZLinuxTech" |openssl req -new -key $SERVICE.key -out $SERVICE.csropenssl ca -in $SERVICE.csr -out $SERVICE.crt -days 3650rm -rf $SERVICE.csrcp /etc/pki/CA/cacert.pem .chmod 600 ./*