mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-24 14:29:07 +02:00
[client] make /var/lib/netbird paths configurable (#3084)
- NB_STATE_DIR - NB_UNCLEAN_SHUTDOWN_RESOLV_FILE - NB_DNS_STATE_FILE
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
//go:build !android
|
||||
|
||||
package dns
|
||||
|
||||
import (
|
||||
"github.com/netbirdio/netbird/client/configs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
var fileUncleanShutdownResolvConfLocation string
|
||||
|
||||
func init() {
|
||||
fileUncleanShutdownResolvConfLocation = os.Getenv("NB_UNCLEAN_SHUTDOWN_RESOLV_FILE")
|
||||
if fileUncleanShutdownResolvConfLocation == "" {
|
||||
fileUncleanShutdownResolvConfLocation = filepath.Join(configs.StateDir, "resolv.conf")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user