Default to $MNT for db path
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
*.key
|
||||
rssmon2
|
||||
db
|
||||
*.db
|
||||
vendor
|
||||
*.crt
|
||||
2do
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -17,7 +18,7 @@ type Config struct {
|
||||
|
||||
func New() *Config {
|
||||
lookups := make(map[string]*string)
|
||||
add(cdbpath, "./db", lookups)
|
||||
add(cdbpath, path.Join(os.Getenv("MNT"), "db.db"), lookups)
|
||||
add(port, ":9101", lookups)
|
||||
flag.Parse()
|
||||
return &Config{
|
||||
|
||||
Reference in New Issue
Block a user