[ssl_mgmt] Alert user if no overwrite occur
This commit is contained in:
parent
2674b4341d
commit
c76bf20637
|
@ -220,9 +220,21 @@ generate_cert ()
|
|||
return 1
|
||||
fi
|
||||
getfacl "$keyPath" | setfacl --set-file=- newkeys/$keyFile
|
||||
if [ ! -f "private/$keyFile" ]
|
||||
then
|
||||
echo -n "Error! No file named $keyFile in directory" >&2
|
||||
echo " $(readlink -f private):" >&2
|
||||
echo "there might be a problem" >&2
|
||||
fi
|
||||
mv newkeys/$keyFile private
|
||||
openssl ca -batch -out newcerts/$certFile -config $confFile -passin file:/root/passwords/root_ca -infiles csr/$reqFile
|
||||
getfacl "$certPath" | setfacl --set-file=- newcerts/$certFile
|
||||
if [ ! -f "certs/$certFile" ]
|
||||
then
|
||||
echo "No file named $certFile in directory" >&2
|
||||
echo " $(readlink -f certs):" >&2
|
||||
echo "there might be a problem" >&2
|
||||
fi
|
||||
mv newcerts/$certFile certs
|
||||
cat private/$keyFile certs/$certFile > private/$keycertFile
|
||||
return 0
|
||||
|
|
Loading…
Reference in New Issue