Skip to content

Commit

Permalink
remove defer on postscript | increase sleep time to 5 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpalide committed Feb 4, 2022
1 parent e7b6b9a commit 7213fc2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/util/updater/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,10 @@ func (u *Updater) Update(updateConfig UpdateConfig) (updated bool, err error) {
u.log.Info("Installing new version compeleted.")

u.status.Set("Updating completed. Running autoconfig script and restart services.")
defer func() {
go u.runningAutoconfig()
}()
u.log.Info("Updating completed. Running autoconfig script and restart services.")

go u.runningAutoconfig()

return true, nil
}

Expand Down Expand Up @@ -235,7 +234,7 @@ func (u *Updater) aptInstall() error {
}

func (u *Updater) runningAutoconfig() {
if err := exec.Command("bash", "-c", "sleep 2 ; sudo skywire-autoconfig").Process.Release(); err != nil {
if err := exec.Command("bash", "-c", "sleep 5s ; sudo skywire-autoconfig").Process.Release(); err != nil {
u.log.Error("Get error during installing skywire-bin package")
}
}
Expand Down

0 comments on commit 7213fc2

Please sign in to comment.