Skip to content

Commit

Permalink
Avoid reseting the config on deb/rpm upgrades
Browse files Browse the repository at this point in the history
Fixes #789
Fixes #790
Fixes #791
  • Loading branch information
rs committed Jan 26, 2023
1 parent a089d46 commit 632b26f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ func svc(args []string) error {
var c config.Config
if cmd == "install" {
// Reset the stored configuration when install is provided with
// parameters
useStorage := len(args) == 0
// parameters. Only exception is if the only param is -bogus-priv as a
// backward compatibility with post upgrade scripts in deb/rpm packages.
useStorage := len(args) == 0 || (len(args) == 1 && args[0] == "-bogus-priv")
c.Parse("nextdns "+cmd, args, useStorage)
}

Expand Down

0 comments on commit 632b26f

Please sign in to comment.