Fixed SPN HUB using wrong instance
This commit is contained in:
@@ -55,7 +55,7 @@ func TestGet(t *testing.T) { //nolint:paralleltest
|
|||||||
// reset
|
// reset
|
||||||
options = make(map[string]*Option)
|
options = make(map[string]*Option)
|
||||||
|
|
||||||
err := log.Start()
|
err := log.Start("info", true, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,12 @@ if [[ $1 == "dev" ]]; then
|
|||||||
DEV="-race"
|
DEV="-race"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set GOOS and GOARCH for Darwin to use Linux architecture
|
||||||
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
|
export GOOS=linux
|
||||||
|
export GOARCH=amd64
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Please notice, that this build script includes metadata into the build."
|
echo "Please notice, that this build script includes metadata into the build."
|
||||||
echo "This information is useful for debugging and license compliance."
|
echo "This information is useful for debugging and license compliance."
|
||||||
echo "Run the compiled binary with the -version flag to see the information included."
|
echo "Run the compiled binary with the -version flag to see the information included."
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import (
|
|||||||
"github.com/safing/portmaster/service"
|
"github.com/safing/portmaster/service"
|
||||||
"github.com/safing/portmaster/service/configure"
|
"github.com/safing/portmaster/service/configure"
|
||||||
"github.com/safing/portmaster/service/updates"
|
"github.com/safing/portmaster/service/updates"
|
||||||
|
"github.com/safing/portmaster/spn"
|
||||||
"github.com/safing/portmaster/spn/conf"
|
"github.com/safing/portmaster/spn/conf"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ func initializeGlobals(cmd *cobra.Command, args []string) {
|
|||||||
|
|
||||||
// Configure service.
|
// Configure service.
|
||||||
cmdbase.SvcFactory = func(svcCfg *service.ServiceConfig) (cmdbase.ServiceInstance, error) {
|
cmdbase.SvcFactory = func(svcCfg *service.ServiceConfig) (cmdbase.ServiceInstance, error) {
|
||||||
svc, err := service.New(svcCfg)
|
svc, err := spn.New(svcCfg)
|
||||||
return svc, err
|
return svc, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// logging
|
// logging
|
||||||
err := log.Start()
|
err := log.Start("info", true, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("failed to start logging: %s\n", err)
|
fmt.Printf("failed to start logging: %s\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user