"
+ services_html+="${COCKPIT_HOSTNAME}.${BASE_DOMAIN}"
+ services_html+=""
- # Update the services list in the default page
- sed -i "s|SERVICES_LIST|${services_html}|g" "${nginx_conf_file}"
+ # Update the HTML file with the services list
+ local html_file="./nginx/index.html"
+ sed -i "s|SERVICES_LIST|${services_html}|g" "${html_file}"
echo "Nginx configuration generated at ${nginx_conf_file} based on running services"
}
@@ -746,7 +814,7 @@ SERVICE_CMDS[zigbee2mqtt]="podman run -d --name zigbee2mqtt --restart unless-sto
SERVICE_CMDS[frigate]="podman run -d --name frigate --restart unless-stopped --network ${NETWORK_NAME} --privileged -e TZ=${TZ} -p ${FRIGATE_PORT}:5000/tcp -p 1935:1935 -v ${FRIGATE_RECORDINGS_HOST_PATH}:/media/frigate:rw -v ./frigate_config.yml:/config/config.yml:ro -v /etc/localtime:/etc/localtime:ro --shm-size 256m ghcr.io/blakeblackshear/frigate:stable"
SERVICE_CMDS[grafana]="podman run -d --name grafana --restart unless-stopped --network ${NETWORK_NAME} -p 3000:3000 -v grafana_data:/var/lib/grafana -e GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER} -e GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD} -e GF_SECURITY_SECRET_KEY=${GRAFANA_SECRET_KEY} docker.io/grafana/grafana:latest"
SERVICE_CMDS[nodered]="podman run -d --name nodered --restart unless-stopped --network ${NETWORK_NAME} -p ${NODERED_PORT}:1880 -e TZ=${TZ} -e DOCKER_HOST=unix:///var/run/docker.sock -v nodered_data:/data -v ${PODMAN_SOCKET_PATH}:/var/run/docker.sock:ro --security-opt label=disable --user root docker.io/nodered/node-red:latest"
-SERVICE_CMDS[nginx]="podman run -d --name nginx --restart unless-stopped --network ${NETWORK_NAME} --add-host=host.containers.internal:host-gateway -p 80:80 --security-opt label=disable -v ${PWD}/nginx/nginx.conf:/etc/nginx/nginx.conf:ro -v nginx_cache:/var/cache/nginx docker.io/library/nginx:alpine"
+SERVICE_CMDS[nginx]="podman run -d --name nginx --restart unless-stopped --network ${NETWORK_NAME} --add-host=host.containers.internal:host-gateway -p 80:80 --security-opt label=disable -v ${PWD}/nginx/nginx.conf:/etc/nginx/nginx.conf:ro -v ${PWD}/nginx/index.html:/usr/share/nginx/html/index.html:ro -v ${PWD}/nginx/style.css:/usr/share/nginx/html/style.css:ro -v nginx_cache:/var/cache/nginx docker.io/library/nginx:alpine"
SERVICE_CMDS[doubletake]="podman run -d --name doubletake --restart unless-stopped --network ${NETWORK_NAME} -p 3001:3000 -v doubletake_data:/.storage -e TZ=${TZ} docker.io/jakowenko/double-take:latest"
SERVICE_NAMES=(mosquitto influxdb zigbee2mqtt frigate grafana nodered nginx doubletake)
From 5b11db63615610198dbd22d1ea5996dab2868214 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 24 Nov 2025 10:30:57 +0000
Subject: [PATCH 3/5] Use template file for HTML generation and update
gitignore
Co-authored-by: Stolas <610753+Stolas@users.noreply.github.com>
---
.gitignore | 1 +
nginx/{index.html => index.html.template} | 0
startup.sh | 8 ++++++--
3 files changed, 7 insertions(+), 2 deletions(-)
rename nginx/{index.html => index.html.template} (100%)
diff --git a/.gitignore b/.gitignore
index 093c5a0..f1cf9ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ frigate_config.yml
# Generated configurations
nginx/nginx.conf
+nginx/index.html
# Vim temporary files
*~
diff --git a/nginx/index.html b/nginx/index.html.template
similarity index 100%
rename from nginx/index.html
rename to nginx/index.html.template
diff --git a/startup.sh b/startup.sh
index b7d3a9a..0cfc0a1 100755
--- a/startup.sh
+++ b/startup.sh
@@ -273,8 +273,10 @@ NGINX_EOF
services_html+="${COCKPIT_HOSTNAME}.${BASE_DOMAIN}"
services_html+=""
- # Update the HTML file with the services list
+ # Copy template and update the HTML file with the services list
+ local html_template="./nginx/index.html.template"
local html_file="./nginx/index.html"
+ cp "${html_template}" "${html_file}"
sed -i "s|SERVICES_LIST|${services_html}|g" "${html_file}"
echo "Nginx configuration generated at ${nginx_conf_file}"
@@ -516,8 +518,10 @@ NGINX_EOF
services_html+="${COCKPIT_HOSTNAME}.${BASE_DOMAIN}"
services_html+=""
- # Update the HTML file with the services list
+ # Copy template and update the HTML file with the services list
+ local html_template="./nginx/index.html.template"
local html_file="./nginx/index.html"
+ cp "${html_template}" "${html_file}"
sed -i "s|SERVICES_LIST|${services_html}|g" "${html_file}"
echo "Nginx configuration generated at ${nginx_conf_file} based on running services"
From a0f95503018e471ccb1155713158d0e4e71444a5 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 24 Nov 2025 10:32:47 +0000
Subject: [PATCH 4/5] Fix title consistency to use Home IoT/SCADA Stack with
slash
Co-authored-by: Stolas <610753+Stolas@users.noreply.github.com>
---
nginx/index.html.template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/nginx/index.html.template b/nginx/index.html.template
index bd861c4..5fda501 100644
--- a/nginx/index.html.template
+++ b/nginx/index.html.template
@@ -3,7 +3,7 @@
- Home IoT SCADA Stack
+ Home IoT/SCADA Stack
@@ -14,7 +14,7 @@
nginx
-
Home IoT SCADA Stack
+
Home IoT/SCADA Stack
Containerized IoT & Home Automation Platform
@@ -56,7 +56,7 @@
From 12c994dac801e3107d575d5225f7923e89018e79 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 24 Nov 2025 10:34:46 +0000
Subject: [PATCH 5/5] Add error handling for template file copy operations
Co-authored-by: Stolas <610753+Stolas@users.noreply.github.com>
---
startup.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/startup.sh b/startup.sh
index 0cfc0a1..b6499a0 100755
--- a/startup.sh
+++ b/startup.sh
@@ -276,6 +276,10 @@ NGINX_EOF
# Copy template and update the HTML file with the services list
local html_template="./nginx/index.html.template"
local html_file="./nginx/index.html"
+ if [ ! -f "${html_template}" ]; then
+ echo "ERROR: HTML template file not found at ${html_template}"
+ return 1
+ fi
cp "${html_template}" "${html_file}"
sed -i "s|SERVICES_LIST|${services_html}|g" "${html_file}"
@@ -521,6 +525,10 @@ NGINX_EOF
# Copy template and update the HTML file with the services list
local html_template="./nginx/index.html.template"
local html_file="./nginx/index.html"
+ if [ ! -f "${html_template}" ]; then
+ echo "ERROR: HTML template file not found at ${html_template}"
+ return 1
+ fi
cp "${html_template}" "${html_file}"
sed -i "s|SERVICES_LIST|${services_html}|g" "${html_file}"