diff --git a/scripts/generate-ssl-certs.sh b/scripts/generate-ssl-certs.sh index c77082d19a..5caaaa9a98 100644 --- a/scripts/generate-ssl-certs.sh +++ b/scripts/generate-ssl-certs.sh @@ -1,4 +1,13 @@ #!/bin/bash + +if [ ! -e server.js ] +then + echo "Error: could not find main application server.js file" + echo "You should run the generate-ssl-certs.sh script from the main MEAN application root directory" + echo "i.e: bash scripts/generate-ssl-cers.sh" + exit -1 +fi + echo "Generating self-signed certificates..." mkdir -p ./config/sslcerts openssl genrsa -out ./config/sslcerts/key.pem -aes256 1024