read the footer.html from /etc

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-11-06 17:10:00 -06:00
parent 316f169bc0
commit e591cdd685
2 changed files with 9 additions and 8 deletions

View File

@ -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
}

View File

@ -1,9 +1,3 @@
<br>
echo deb http://mirrors.wit.com/wit/ sid main > /etc/apt/sources.list.d/wit.list <br>
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4A854AEAF7E0E16D <br>
apt update<br>
apt install go-clone # replicates the old 'go get' behavior<br>
apt install go-deb # make a debian package from a golang project<br>
apt install networkquality # debian package of apple's command line speedtest tool<br>
apt install virtigo # virt-manager from the command line (runs wit.com)<br>
your footer here<br>
<br>