Add update checker

This commit is contained in:
Owen
2025-09-29 14:37:07 -07:00
parent 44802aae7c
commit 2445ced83b

View File

@@ -15,6 +15,7 @@ import (
"time"
"github.com/fosrl/newt/logger"
"github.com/fosrl/newt/updates"
"github.com/fosrl/newt/websocket"
"github.com/fosrl/olm/httpserver"
"github.com/fosrl/olm/peermonitor"
@@ -326,6 +327,10 @@ func runOlmMainWithArgs(ctx context.Context, args []string) {
logger.Info("Olm version " + olmVersion)
}
if err := updates.CheckForUpdate("fosrl", "olm", olmVersion); err != nil {
logger.Debug("Failed to check for updates: %v", err)
}
// Log startup information
logger.Debug("Olm service starting...")
logger.Debug("Parameters: endpoint='%s', id='%s', secret='%s'", endpoint, id, secret)