Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 30 lines (27 sloc) 0.731 kb
if [ ! -f "key" ]; then
echo "RSA key does not exist, generating..."
ssh-keygen -t rsa -f key -N ""
RES=$?
if [ $RES != 0 ]; then
echo "Key generation failed with error $RES!"
exit $RES
fi
fi
if [ ! -f "openacd.csr" ]; then
echo "Certificate Signing Request does not exist, generating..."
openssl req -new -key key -out openacd.csr
RES=$?
if [ $RES != 0 ]; then
echo "CSR generation failed with error $RES"
exit $RES
fi
fi
if [ ! -f "openacd.crt" ]; then
echo "Certificate does not exists, generating self-signed for a year..."
openssl x509 -req -days 365 -in openacd.csr -signkey key -out openacd.crt
RES=$?
if [ $RES != 0 ]; then
echo "Certificate generation failed with error $RES"
exit $RES
fi
fi
Jump to Line
Something went wrong with that request. Please try again.