fix: change dir if \!CurrentDirAvaliable()

This commit is contained in:
go-compile 2024-02-20 18:10:55 +00:00
parent 16f809bb5e
commit 311ddecd26
No known key found for this signature in database
GPG Key ID: 53F4922E9D5497B8
1 changed files with 1 additions and 1 deletions

View File

@ -769,7 +769,7 @@ func initWorkingDir(opts options) (err error) {
if opts.workDir != "" {
// If there is a custom config file, use it's directory as our working dir
Context.workDir = opts.workDir
} else if pwdAvaliable {
} else if !pwdAvaliable {
// If running as a service and from /usr/bin/ use /var/lib for working dir instead of
// /usr/bin/data
Context.workDir = "/var/lib/AdGuardHome"