diff --git a/config/config.go b/config/config.go index e2ab002..af9fe18 100644 --- a/config/config.go +++ b/config/config.go @@ -34,7 +34,7 @@ func InitConfig(acme_path string) (cfg *HookConfig, err error) { // Get My Name (AppName) _, execName := filepath.Split(os.Args[0]) // Prepare Config full-path location - cfg_file := fmt.Sprintf("%s/hooks/%s.yaml", acme_path, execName) + cfg_file := fmt.Sprintf("%s/conf/%s.yaml", acme_path, execName) // Read Yaml Config yamlFile, err := ioutil.ReadFile(cfg_file) if err != nil { diff --git a/utils/dns_tools.go b/utils/dns_tools.go index 5917607..2240330 100644 --- a/utils/dns_tools.go +++ b/utils/dns_tools.go @@ -197,3 +197,12 @@ func UnFqdn(name string) string { } return name } + +func DomainBelongsToProvider(d string, l []string) bool { + for _, pd := range l { + if strings.Contains(d, pd) { + return true + } + } + return false +} diff --git a/utils/utils.go b/utils/utils.go index c3b3036..9af31fb 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -3,7 +3,6 @@ package utils import ( "encoding/json" "fmt" - "strings" "time" ) @@ -16,16 +15,6 @@ func StirngInSlice(s string, l []string) bool { return false } -func DomainBelongsToProvider(d string, l []string) bool { - for _, pd := range l { - fmt.Println(pd, d) - if strings.Contains(d, pd) { - return true - } - } - return false -} - func Dump(cls interface{}) { data, err := json.MarshalIndent(cls, "", " ") if err != nil {