Move updates

This commit is contained in:
Owen
2025-06-22 12:10:00 -04:00
parent e2dd965654
commit e642983b88
3 changed files with 5 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ import (
"github.com/fosrl/newt/docker"
"github.com/fosrl/newt/logger"
"github.com/fosrl/newt/proxy"
"github.com/fosrl/newt/updates"
"github.com/fosrl/newt/websocket"
"github.com/fosrl/newt/wg"
"github.com/fosrl/newt/wgtester"
@@ -192,7 +193,7 @@ func main() {
logger.Info("Newt version " + newtVersion)
}
if err := CheckForUpdate("fosrl", "newt", newtVersion); err != nil {
if err := updates.CheckForUpdate("fosrl", "newt", newtVersion); err != nil {
logger.Error("Error checking for updates: %v\n", err)
}

View File

@@ -1,4 +1,4 @@
package main
package updates
import (
"encoding/json"

View File

@@ -1,4 +1,4 @@
package main
package util
import (
"bytes"
@@ -369,7 +369,7 @@ func updateTargets(pm *proxy.ProxyManager, action string, tunnelIP string, proto
return nil
}
func executeUpdownScript(action, proto, target string) (string, error) {
func executeUpdownScript(action, proto, target string, updownScript string) (string, error) {
if updownScript == "" {
return target, nil
}