Changes

From SME Server
Jump to navigationJump to search
13 bytes added ,  03:48, 16 August 2023
Line 158: Line 158:  
# user is equal to parameter one or the first argument when you actually
 
# user is equal to parameter one or the first argument when you actually
 
# run the script
 
# run the script
user=$1
+
user=\$1
   −
openssl genrsa -out private/${user}.key 2048
+
openssl genrsa -out private/\${user}.key 2048
cat ssl.cnf | sed 's/insert_hostname/'${user}'/'> ssl2.cnf
+
cat ssl.cnf | sed 's/insert_hostname/'\${user}'/'> ssl2.cnf
openssl req -config ssl2.cnf -new -nodes -out certs/${user}.csr -key private/${user}.key
+
openssl req -config ssl2.cnf -new -nodes -out certs/\${user}.csr -key private/\${user}.key
openssl ca -config ssl2.cnf -keyfile private/${caname}_ca_cert.key -cert ${caname}_ca_cert.crt \
+
openssl ca -config ssl2.cnf -keyfile private/\${caname}_ca_cert.key -cert \${caname}_ca_cert.crt \
     -out certs/${user}.crt -outdir certs -infiles certs/${user}.csr
+
     -out certs/\${user}.crt -outdir certs -infiles certs/\${user}.csr
cat certs/${user}.crt private/${user}.key > ${user}.pem
+
cat certs/\${user}.crt private/\${user}.key > \${user}.pem
mv ssl2.cnf confs/${user}-ssl.cnf
+
mv ssl2.cnf confs/\${user}-ssl.cnf
 
_EOT
 
_EOT
 
chmod a+x ~/bin/koji_make_cert.sh
 
chmod a+x ~/bin/koji_make_cert.sh
381

edits

Navigation menu