Improve status module
This commit is contained in:
18
status/updates.go
Normal file
18
status/updates.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package status
|
||||
|
||||
// Update status options
|
||||
const (
|
||||
UpdateStatusCurrentStable = "stable"
|
||||
UpdateStatusCurrentBeta = "beta"
|
||||
UpdateStatusAvailable = "available" // restart or reboot required
|
||||
UpdateStatusFailed = "failed" // check logs
|
||||
)
|
||||
|
||||
// SetUpdateStatus updates the system status with a new update status.
|
||||
func SetUpdateStatus(newStatus string) {
|
||||
status.Lock()
|
||||
status.UpdateStatus = newStatus
|
||||
status.Unlock()
|
||||
|
||||
go status.Save()
|
||||
}
|
||||
Reference in New Issue
Block a user