Update updates package to support pmctl

This commit is contained in:
Daniel
2019-03-13 09:40:36 +01:00
parent e07a2a058a
commit 6f268906ea
9 changed files with 66 additions and 190 deletions

View File

@@ -7,6 +7,8 @@ import (
"github.com/Safing/portbase/notifications"
)
const coreIdentifier = "core/portmaster"
var lastNotified time.Time
func updateNotifier() {
@@ -24,7 +26,7 @@ func updateNotifier() {
// create notification
(&notifications.Notification{
ID: "updates-core-update-available",
Message: fmt.Sprintf("There is an update available for the portmaster core (%s), you may apply the update with the -upgrade flag.", version),
Message: fmt.Sprintf("There is an update available for the Portmaster core (v%s), please restart the Portmaster to apply the update.", version),
Type: notifications.Info,
Expires: time.Now().Add(1 * time.Minute).Unix(),
}).Init().Save()