From 99f38da618967ae8de2a373c05318ea16a6162d2 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 6 Oct 2024 16:34:16 -0500 Subject: [PATCH] add powerpaneld Signed-off-by: Jeff Carr --- Makefile | 2 +- main.go | 6 +++--- resources/repomap | 1 + resources/uptime.html | 8 ++++++++ 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 resources/uptime.html diff --git a/Makefile b/Makefile index bd07e5a..19486e6 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all: git pull echo "build it!" GO111MODULE=off go build -v -x - su -c ./go.wit.com + ./go.wit.com # su -c "setcap 'cap_net_bind_service=+ep' go.wit.com" goimports: diff --git a/main.go b/main.go index 6cb9384..2f594f4 100644 --- a/main.go +++ b/main.go @@ -98,7 +98,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) { } // used for uptime monitor checking if tmp == "/uptime" { - fmt.Fprintln(w, "OK") + writeFile(w, "uptime.html") return } log.Warn("BAD URL =", url, "REPO URL =", repourl) @@ -149,8 +149,8 @@ func main() { // } log.Println("found log =", versionMap["go.wit.com/log"]) http.HandleFunc("/", okHandler) - go https() - err := http.ListenAndServe(":80", nil) + // go https() + err := http.ListenAndServe(":2520", nil) if err != nil { log.Println("Error starting server:", err) } diff --git a/resources/repomap b/resources/repomap index 10b1a33..683d705 100644 --- a/resources/repomap +++ b/resources/repomap @@ -21,6 +21,7 @@ go.wit.com/apps/control-panel-cloudflare git.wit.org/wit/control-panel-cloudflar go.wit.com/apps/control-panel-vpn git.wit.org/jcarr/control-panel-vpn go.wit.com/apps/go-gui-toolkits git.wit.org/gui/go-gui-toolkits toolkit build helper go.wit.com/apps/go.wit.com git.wit.org/jcarr/go.wit.com +go.wit.com/apps/powerpaneld git.wit.org/jcarr/powerpaneld go.wit.com/apps/go-clone git.wit.org/gui/go-clone # gui toolkit packages diff --git a/resources/uptime.html b/resources/uptime.html new file mode 100644 index 0000000..46f748f --- /dev/null +++ b/resources/uptime.html @@ -0,0 +1,8 @@ + + + + + + OK12358 + +