Disable restarting on failure for UI components
This commit is contained in:
@@ -46,6 +46,7 @@ type Options struct {
|
||||
AllowDownload bool // allow download of component if it is not yet available
|
||||
AllowHidingWindow bool // allow hiding the window of the subprocess
|
||||
NoOutput bool // do not use stdout/err if logging to file is available (did not fail to open log file)
|
||||
RestartOnFail bool // Try restarting automatically, if the started component fails.
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -56,6 +57,7 @@ func init() {
|
||||
AllowDownload: true,
|
||||
AllowHidingWindow: true,
|
||||
PIDFile: true,
|
||||
RestartOnFail: true,
|
||||
},
|
||||
{
|
||||
Name: "Portmaster App",
|
||||
@@ -77,6 +79,7 @@ func init() {
|
||||
AllowDownload: true,
|
||||
AllowHidingWindow: true,
|
||||
PIDFile: true,
|
||||
RestartOnFail: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -213,7 +216,7 @@ func runAndRestart(opts *Options, args []string) error {
|
||||
log.Printf("%s exited without error", opts.Identifier)
|
||||
}
|
||||
|
||||
if !tryAgain {
|
||||
if !opts.RestartOnFail || !tryAgain {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user