Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/setup_webserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ EOF
fi

if [ "$webServerType" = "nginx" -o "$httpsTermination" = "VMSS" ]; then
# update startup script to wait for certificate in /moodle mount
sed -i '/After=/ s/$/ moodle.mount/' /lib/systemd/system/nginx.service && systemctl daemon-reload
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but /lib/system/system/nginx.service may get overwritten if nginx version is upgraded.

I've been investigating how to fix this properly, and found that the correct location is /etc/systemd/system/nginx.service.d/override.conf. I was working on making that change, and in the meantime you beat me, which I'm very grateful for.

We'll accept this PR and change further to update the right conf file.

# restart Nginx
sudo service nginx restart
fi
Expand Down