mirror of
https://github.com/safing/portmaster
synced 2025-09-02 18:49:14 +00:00
Download update index if not available
This commit is contained in:
parent
2bc0da6700
commit
f3b5cb89ce
2 changed files with 8 additions and 2 deletions
2
main.go
2
main.go
|
@ -31,7 +31,7 @@ func init() {
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
// Set Info
|
// Set Info
|
||||||
info.Set("Portmaster", "0.3.1", "AGPLv3", true)
|
info.Set("Portmaster", "0.3.2", "AGPLv3", true)
|
||||||
|
|
||||||
// Start
|
// Start
|
||||||
err := modules.Start()
|
err := modules.Start()
|
||||||
|
|
|
@ -61,7 +61,13 @@ func start() error {
|
||||||
err = LoadIndexes()
|
err = LoadIndexes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
log.Infof("updates: stable.json does not yet exist, waiting for first update cycle")
|
// download indexes
|
||||||
|
log.Infof("updates: downloading update index...")
|
||||||
|
|
||||||
|
err = UpdateIndexes()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue