From 460a23cf2ba5da2ab809104f7316e159d06502ce Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Wed, 19 May 2021 01:28:47 +0200 Subject: [PATCH] Check for abs/rel path in db_path --- cmd/headscale/cli/utils.go | 2 +- config.json.sqlite.example | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/headscale/cli/utils.go b/cmd/headscale/cli/utils.go index 823089d2..1560dc2c 100644 --- a/cmd/headscale/cli/utils.go +++ b/cmd/headscale/cli/utils.go @@ -44,7 +44,7 @@ func getHeadscaleApp() (*headscale.Headscale, error) { DerpMap: derpMap, DBtype: viper.GetString("db_type"), - DBpath: viper.GetString("db_path"), + DBpath: absPath(viper.GetString("db_path")), DBhost: viper.GetString("db_host"), DBport: viper.GetInt("db_port"), DBname: viper.GetString("db_name"), diff --git a/config.json.sqlite.example b/config.json.sqlite.example index 40bd85b2..2ae821b2 100644 --- a/config.json.sqlite.example +++ b/config.json.sqlite.example @@ -4,7 +4,7 @@ "private_key_path": "private.key", "derp_map_path": "derp.yaml", "db_type": "sqlite3", - "db_path": "./db.sqlite", + "db_path": "db.sqlite", "tls_letsencrypt_hostname": "", "tls_letsencrypt_cache_dir": ".cache", "tls_letsencrypt_challenge_type": "HTTP-01",