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