forked from adrianlzt/docker-nginx-php-upload
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
keep certificates if already created in older run
- Loading branch information
1 parent
094725a
commit 2d6133f
Showing
2 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
cd /etc/nginx/ssl | ||
mkcert -install | ||
mkcert localhost ${HOSTIP} | ||
# if localhost+1.pem do not already exist, create them | ||
if [ -f "/etc/nginx/ssl/localhost+1.pem" ]; then | ||
echo "SSL certificate already exists" | ||
else | ||
mkcert -install | ||
cp /root/.local/share/mkcert/rootCA.pem /var/www/html/uploads/rootCA.pem | ||
echo "You find the rootCA.pem in the uploads folder" | ||
mkcert localhost ${HOSTIP} | ||
fi | ||
|
||
# Start the server | ||
/start.sh |