mirror of
https://github.com/safing/portmaster
synced 2025-09-02 10:39:22 +00:00
Update restart exit code in pmctl
This commit is contained in:
parent
d89b612e3d
commit
3b0d60b611
1 changed files with 5 additions and 1 deletions
|
@ -17,6 +17,10 @@ import (
|
||||||
"github.com/tevino/abool"
|
"github.com/tevino/abool"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
restartCode = 23
|
||||||
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
runningInConsole bool
|
runningInConsole bool
|
||||||
onWindows = runtime.GOOS == "windows"
|
onWindows = runtime.GOOS == "windows"
|
||||||
|
@ -375,7 +379,7 @@ func execute(opts *Options, args []string) (cont bool, err error) {
|
||||||
case 1:
|
case 1:
|
||||||
// error exit
|
// error exit
|
||||||
return true, fmt.Errorf("error during execution: %s", err)
|
return true, fmt.Errorf("error during execution: %s", err)
|
||||||
case 2357427: // Leet Speak for "restart"
|
case restartCode:
|
||||||
// restart request
|
// restart request
|
||||||
log.Printf("restarting %s\n", opts.Identifier)
|
log.Printf("restarting %s\n", opts.Identifier)
|
||||||
return true, nil
|
return true, nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue