Merge branch 'main' into hs2021-v2
This commit is contained in:
commit
67ffebc30a
6 changed files with 19 additions and 4 deletions
6
app.go
6
app.go
|
@ -145,12 +145,16 @@ func NewHeadscale(cfg *Config) (*Headscale, error) {
|
|||
switch cfg.DBtype {
|
||||
case Postgres:
|
||||
dbString = fmt.Sprintf(
|
||||
"host=%s dbname=%s user=%s sslmode=disable",
|
||||
"host=%s dbname=%s user=%s",
|
||||
cfg.DBhost,
|
||||
cfg.DBname,
|
||||
cfg.DBuser,
|
||||
)
|
||||
|
||||
if !cfg.DBssl {
|
||||
dbString += " sslmode=disable"
|
||||
}
|
||||
|
||||
if cfg.DBport != 0 {
|
||||
dbString += fmt.Sprintf(" port=%d", cfg.DBport)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue