summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-06 17:10:00 -0600
committerJeff Carr <[email protected]>2024-11-06 17:10:00 -0600
commite591cdd6857b1d3f2b84d5fa54931758f363300d (patch)
treecc59826786031d0c607d0584d5f52f499c330a7b /main.go
parent316f169bc0e5ed955fea15aed2fd1d1055a7c5c2 (diff)
read the footer.html from /etc
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/main.go b/main.go
index 97a539e..f34ba16 100644
--- a/main.go
+++ b/main.go
@@ -54,7 +54,14 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
indexBodyStart(w)
indexBodyScanConfig(w)
indexDivEnd(w)
- writeFile(w, "footer.html")
+ pfile, err := os.ReadFile("/etc/gowebd/footer.html")
+ if err == nil {
+ fmt.Fprint(w, string(pfile))
+ } else {
+ log.Warn(err, "no footer filee found in /etc/gowebd/footer.html")
+ log.Warn("falling back to the resources/footer.html")
+ writeFile(w, "footer.html")
+ }
indexBodyEnd(w)
return
}