From a4f6b90ce86a78524505b9e778dc82cb5c7f04d3 Mon Sep 17 00:00:00 2001 From: Patrick Pacher Date: Tue, 4 Aug 2020 15:37:57 +0200 Subject: [PATCH] Add support for SPN hub --- cmds/portmaster-start/run.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmds/portmaster-start/run.go b/cmds/portmaster-start/run.go index 028f3de7..f62af95e 100644 --- a/cmds/portmaster-start/run.go +++ b/cmds/portmaster-start/run.go @@ -59,6 +59,13 @@ func init() { AllowDownload: false, AllowHidingWindow: true, }, + { + Name: "Safing Privacy Network", + Identifier: "hub/spn-hub", + ShortIdentifier: "hub", + AllowDownload: true, + AllowHidingWindow: true, + }, }) } @@ -119,10 +126,10 @@ func run(opts *Options, cmdArgs []string) (err error) { args := getExecArgs(opts, cmdArgs) // check for duplicate instances - if opts.ShortIdentifier == "core" { + if opts.ShortIdentifier == "core" || opts.ShortIdentifier == "hub" { pid, _ := checkAndCreateInstanceLock(opts.ShortIdentifier) if pid != 0 { - return fmt.Errorf("another instance of Portmaster Core is already running: PID %d", pid) + return fmt.Errorf("another instance of %s is already running: PID %d", opts.Name, pid) } defer func() { err := deleteInstanceLock(opts.ShortIdentifier)