mirror of
https://github.com/safing/portmaster
synced 2025-09-03 19:19:15 +00:00
Disable restarting on failure for UI components
This commit is contained in:
parent
75d8639aa5
commit
e9598520f0
1 changed files with 4 additions and 1 deletions
|
@ -46,6 +46,7 @@ type Options struct {
|
||||||
AllowDownload bool // allow download of component if it is not yet available
|
AllowDownload bool // allow download of component if it is not yet available
|
||||||
AllowHidingWindow bool // allow hiding the window of the subprocess
|
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)
|
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() {
|
func init() {
|
||||||
|
@ -56,6 +57,7 @@ func init() {
|
||||||
AllowDownload: true,
|
AllowDownload: true,
|
||||||
AllowHidingWindow: true,
|
AllowHidingWindow: true,
|
||||||
PIDFile: true,
|
PIDFile: true,
|
||||||
|
RestartOnFail: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Portmaster App",
|
Name: "Portmaster App",
|
||||||
|
@ -77,6 +79,7 @@ func init() {
|
||||||
AllowDownload: true,
|
AllowDownload: true,
|
||||||
AllowHidingWindow: true,
|
AllowHidingWindow: true,
|
||||||
PIDFile: true,
|
PIDFile: true,
|
||||||
|
RestartOnFail: true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -213,7 +216,7 @@ func runAndRestart(opts *Options, args []string) error {
|
||||||
log.Printf("%s exited without error", opts.Identifier)
|
log.Printf("%s exited without error", opts.Identifier)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !tryAgain {
|
if !opts.RestartOnFail || !tryAgain {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue