packer-builds

Packer Builds for LXC and Libvirt
git clone https://git.in0rdr.ch/packer-builds.git
Log | Files | Refs | README

commit 9b6479b4a734af45f465c577b0d6c215201e09d4
parent 97d61d7bb2b0dadb09657b9926a13ddadef81181
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Sun, 12 May 2024 02:37:32 +0200

feat(gatus): v5.10 and ensure nfs for nginx

Diffstat:
Mscripts/gatus.sh | 15++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/scripts/gatus.sh b/scripts/gatus.sh @@ -28,7 +28,7 @@ tar -C /usr/local -xf go.tar.gz export PATH=$PATH:/usr/local/go/bin # Download Gatus -GATUS_VERSION=5.8.0 +GATUS_VERSION=5.10.0 curl -Lo gatus.tar.gz https://github.com/TwiN/gatus/archive/refs/tags/v$GATUS_VERSION.tar.gz tar -xf gatus.tar.gz @@ -116,8 +116,8 @@ cat <<EOF > /etc/nginx/conf.d/gatus.conf server { listen 443 ssl; - ssl_certificate $GATUS_TLS_DIR/fullchain.pem; - ssl_certificate_key $GATUS_TLS_DIR/privkey.pem; + ssl_certificate $GATUS_TLS_DIR/live/up.in0rdr.ch/fullchain.pem; + ssl_certificate_key $GATUS_TLS_DIR/live/up.in0rdr.ch/privkey.pem; location / { proxy_pass http://127.0.0.1:8080; @@ -135,3 +135,12 @@ chown gatus: $GATUS_CONFIG_PATH # Enable Gatus and Nginx systemctl enable gatus systemctl enable nginx + +# Ensure tls on nfs before nginx starts +mkdir -p /etc/systemd/system/nginx.service.d +cat <<EOF > /etc/systemd/system/nginx.service.d/override.conf +[Service] +ExecStartPre= +ExecStartPre=/usr/bin/sh -c 'sleep 5 && mount -a' +ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;' +EOF