diff --git a/snap/local/hooks/cmd/configure/configure.go b/snap/local/hooks/cmd/configure/configure.go index 35bdc67f98..c3e668cd50 100644 --- a/snap/local/hooks/cmd/configure/configure.go +++ b/snap/local/hooks/cmd/configure/configure.go @@ -26,6 +26,7 @@ import ( "strings" hooks "github.com/canonical/edgex-snap-hooks/v2" + snaphookoptions "github.com/canonical/edgex-snap-hooks/v2/options" ) const ( // iota is reset to 0 @@ -601,3 +602,26 @@ func configure() { } } } + +func configureApps() { + hooks.Info("edgexfoundry:configure Processing apps.* and config.* configuration") + err := snaphookoptions.ProcessAppConfig( + "core-data", + "core-metadata", + "core-command", + "support-notifications", + "support-scheduler", + "app-service-configurable", + "device-virtual", + "security-secret-store", + "security-secretstore-setup", + "security-proxy-setup", + "security-bootstrapper", + "sys-mgmgt-agent") + + if err != nil { + hooks.Error(fmt.Sprintf("edgexfoundry:configure could not process options: %v", err)) + os.Exit(1) + } + +} diff --git a/snap/local/hooks/cmd/configure/main.go b/snap/local/hooks/cmd/configure/main.go index d1b269d771..e5d8401206 100644 --- a/snap/local/hooks/cmd/configure/main.go +++ b/snap/local/hooks/cmd/configure/main.go @@ -29,6 +29,7 @@ func main() { if len(os.Args) == 1 { // configure everything configure() + configureApps() return } diff --git a/snap/local/hooks/go.mod b/snap/local/hooks/go.mod index 53536ccc94..1a9e550938 100644 --- a/snap/local/hooks/go.mod +++ b/snap/local/hooks/go.mod @@ -1,5 +1,5 @@ module github.com/canonical/edgex-go/hooks -require github.com/canonical/edgex-snap-hooks/v2 v2.1.3 +require github.com/canonical/edgex-snap-hooks/v2 v2.2.0-beta.2 go 1.17 diff --git a/snap/local/hooks/go.sum b/snap/local/hooks/go.sum index 039e14dc08..9b0212d22f 100644 --- a/snap/local/hooks/go.sum +++ b/snap/local/hooks/go.sum @@ -1,5 +1,5 @@ -github.com/canonical/edgex-snap-hooks/v2 v2.1.3 h1:mcV/atn6k6sN6Uik+lSQGEZi4Q6r96epgBW+u6AGZ3Y= -github.com/canonical/edgex-snap-hooks/v2 v2.1.3/go.mod h1:rOxrwdYL7hJDhxFH3uV+nVgLPjWOhJWgM5PRD5YG1jI= +github.com/canonical/edgex-snap-hooks/v2 v2.2.0-beta.2 h1:HMh7QgZaJmlu3kAEGEgr1PJTr8nbfsQSWLmYuWeuPhI= +github.com/canonical/edgex-snap-hooks/v2 v2.2.0-beta.2/go.mod h1:rOxrwdYL7hJDhxFH3uV+nVgLPjWOhJWgM5PRD5YG1jI= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=