Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.

Commit 5b11db6

Browse files
CopilotStolas
andcommitted
Use template file for HTML generation and update gitignore
Co-authored-by: Stolas <610753+Stolas@users.noreply.github.com>
1 parent fc0771b commit 5b11db6

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ frigate_config.yml
77

88
# Generated configurations
99
nginx/nginx.conf
10+
nginx/index.html
1011

1112
# Vim temporary files
1213
*~

startup.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,10 @@ NGINX_EOF
273273
services_html+="<span class=\"service-url\">${COCKPIT_HOSTNAME}.${BASE_DOMAIN}</span>"
274274
services_html+="</a>"
275275

276-
# Update the HTML file with the services list
276+
# Copy template and update the HTML file with the services list
277+
local html_template="./nginx/index.html.template"
277278
local html_file="./nginx/index.html"
279+
cp "${html_template}" "${html_file}"
278280
sed -i "s|SERVICES_LIST|${services_html}|g" "${html_file}"
279281

280282
echo "Nginx configuration generated at ${nginx_conf_file}"
@@ -516,8 +518,10 @@ NGINX_EOF
516518
services_html+="<span class=\"service-url\">${COCKPIT_HOSTNAME}.${BASE_DOMAIN}</span>"
517519
services_html+="</a>"
518520

519-
# Update the HTML file with the services list
521+
# Copy template and update the HTML file with the services list
522+
local html_template="./nginx/index.html.template"
520523
local html_file="./nginx/index.html"
524+
cp "${html_template}" "${html_file}"
521525
sed -i "s|SERVICES_LIST|${services_html}|g" "${html_file}"
522526

523527
echo "Nginx configuration generated at ${nginx_conf_file} based on running services"

0 commit comments

Comments
 (0)