Skip to content

Commit 624a93c

Browse files
committed
chore: versioning token filename
Signed-off-by: Michele Meloni <[email protected]>
1 parent c04c6b4 commit 624a93c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ Flags:
446446
-m, --mtls enable mutual tls
447447
--pkey string server private key path (default "./tools/mtls/4_client/private/localhost.key.pem")
448448
--servername string used to verify the hostname on the returned certificates (default "localhost")
449-
--tokenfile string authentication token file (default path is $HOME or binary location; the supplied value will be automatically suffixed with _admin; default filename is token_admin) (default "token")
449+
--tokenfile string authentication token file (default path is $HOME or binary location; the supplied value will be automatically suffixed with _admin; default filename is token_admin) (default "token-0.7.0")
450450
451451
Use "immuadmin [command] --help" for more information about a command.
452452

configs/immuclient.toml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
immudb-address = "127.0.0.1"
22
immudb-port = 3322
33
auth = true
4-
tokenfile = "token"
4+
tokenfile = "token-0.7.0"
55
mtls = false
66
servername = "localhost"
77
pkey = "./tools/mtls/4_client/private/localhost.key.pem"

pkg/client/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ func DefaultOptions() *Options {
5959
MTLs: false,
6060
Auth: true,
6161
Config: "configs/immuclient.toml",
62-
TokenFileName: "token",
62+
TokenFileName: "token-0.7.0",
6363
DialOptions: &[]grpc.DialOption{},
6464
PasswordReader: c.DefaultPasswordReader,
65-
Tkns: NewTokenService().WithTokenFileName("token").WithHds(NewHomedirService()),
65+
Tkns: NewTokenService().WithTokenFileName("token-0.7.0").WithHds(NewHomedirService()),
6666
Metrics: true,
6767
PidPath: "",
6868
PrometheusHost: "",

pkg/server/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,10 @@ func (s *ImmuServer) loadUserDatabases(dataDir string) error {
352352
}
353353
//get only first child directories, exclude datadir, exclude systemdb dir
354354
if info.IsDir() &&
355-
(strings.Count(path, string(filepath.Separator)) == 1) &&
356355
(dataDir != path) &&
357356
!strings.Contains(path, s.Options.GetSystemAdminDbName()) &&
358-
!strings.Contains(path, s.Options.GetDefaultDbName()) {
357+
!strings.Contains(path, s.Options.GetDefaultDbName()) &&
358+
!strings.Contains(path, "config"){
359359
dirs = append(dirs, path)
360360
}
361361
return nil

0 commit comments

Comments
 (0)