aboutsummaryrefslogtreecommitdiff
path: root/cmd/acme/config.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-03-06 03:47:34 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-03-06 03:47:34 +0100
commit7088b2b5670f662d396a9b3a2a6229f7856fb59f (patch)
tree66bcafc4aa656792da92482f0aa1ae4e67403b10 /cmd/acme/config.go
parent6da622d5ce30ed1d6637a12486640532c405cbda (diff)
Ensure dirs are made
Diffstat (limited to 'cmd/acme/config.go')
-rw-r--r--cmd/acme/config.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/cmd/acme/config.go b/cmd/acme/config.go
index 26ddedf..016df29 100644
--- a/cmd/acme/config.go
+++ b/cmd/acme/config.go
@@ -3,7 +3,6 @@ package main
import (
"errors"
"io/ioutil"
- "os"
"os/user"
"path"
"strings"
@@ -55,10 +54,7 @@ type domain struct {
}
var (
- errNoProvider = errors.New("no provider specified")
- errNoAccount = errors.New("no account specified")
errNoKey = errors.New("no key file specified")
- errNoCrt = errors.New("no crt file specified")
errNoAltNames = errors.New("no altnames specified")
errNoMail = errors.New("no mail specified")
)
@@ -141,22 +137,6 @@ func LoadConfig(fname string) (*Config, error) {
return c, nil
}
-type Dirmaker interface {
- Mkdirs() error
-}
-
-func (a account) Mkdirs() error {
- return os.MkdirAll(path.Dir(a.KeyFile), 0700)
-}
-
-func (d domain) Mkdirs() error {
- err := os.MkdirAll(path.Dir(d.KeyFile), 0700)
- if err != nil {
- return err
- }
- return os.MkdirAll(path.Dir(d.CrtFile), 0755)
-}
-
func replace(s string) string {
return strings.Replace(s, ".", "_", -1)
}