Skip to content

Commit

Permalink
PMM-12738 don't fail if /srv/nginx isn't writable.
Browse files Browse the repository at this point in the history
  • Loading branch information
BupycHuk committed Dec 18, 2023
1 parent 1db4026 commit 6deb551
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
set -o errexit

mkdir -p /srv/nginx
if [ ! -w "/srv/nginx" ]; then
echo "Directory /srv/nginx is not writable";
if [ ! -e /srv/nginx/certificate.key -o ! -e /srv/nginx/certificate.crt ]; then
echo "Can't generate self-signed certificate. Exiting...";
exit 1;
else
echo "Using existing self-signed certificate";
exit 0;
fi
fi

if [ ! -e /srv/nginx/dhparam.pem ]; then
cp /etc/nginx/ssl/dhparam.pem /srv/nginx/dhparam.pem
Expand Down

0 comments on commit 6deb551

Please sign in to comment.