mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
Add logging to core update notification
This commit is contained in:
parent
19ec8bf428
commit
c65cadb06f
1 changed files with 7 additions and 7 deletions
|
@ -73,7 +73,7 @@ func upgradeCoreNotify() error {
|
|||
|
||||
// check if we can upgrade
|
||||
if pmCoreUpdate == nil || pmCoreUpdate.UpgradeAvailable() {
|
||||
// get newest portmaster-control
|
||||
// get newest portmaster-core
|
||||
new, err := GetPlatformFile(identifier)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -84,12 +84,12 @@ func upgradeCoreNotify() error {
|
|||
}
|
||||
|
||||
if info.GetInfo().Version != pmCoreUpdate.Version() {
|
||||
// create notification
|
||||
(¬ifications.Notification{
|
||||
ID: "updates-core-update-available",
|
||||
Message: fmt.Sprintf("There is an update available for the Portmaster core (v%s), please restart the Portmaster to apply the update.", pmCoreUpdate.Version()),
|
||||
Type: notifications.Info,
|
||||
}).Save()
|
||||
notifications.NotifyInfo(
|
||||
"updates-core-update-available",
|
||||
fmt.Sprintf("There is an update available for the Portmaster core (v%s), please restart the Portmaster to apply the update.", pmCoreUpdate.Version()),
|
||||
)
|
||||
|
||||
log.Debugf("updates: new portmaster version available, sending notification to user")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Add table
Reference in a new issue