Skip to content

Commit

Permalink
fix: daemon help and config log
Browse files Browse the repository at this point in the history
  • Loading branch information
frrist committed Jan 14, 2022
1 parent df5bcfa commit 282f0dd
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions commands/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@ Once the repository is initialized, start the daemon:
lily daemon --repo=<path> --config=<path>/config.toml
Visor will connect to the filecoin network and begin synchronizing with the
chain. To check the synchronization status use 'visor sync status' or
'visor sync wait'.
chain. To check the synchronization status use 'lily sync status' or
'lily sync wait'.
Jobs may be started on the daemon at any time. A watch job will wait for the
daemon to become synchronized before extracting data and will pause if the
daemon falls out of sync. Start a watch using 'visor watch'.
daemon falls out of sync. Start a watch using 'lily watch'.
A walk job will start immediately. Start a walk using 'visor walk'. A walk may
A walk job will start immediately. Start a walk using 'lily walk'. A walk may
only be performed between heights that have been synchronized with the network.
Note that jobs are not persisted between restarts of the daemon. See
'visor help job' for more information on managing jobs being run by the daemon.
'lily help job' for more information on managing jobs being run by the daemon.
`,

Flags: []cli.Flag{
Expand Down Expand Up @@ -189,11 +189,12 @@ Note that jobs are not persisted between restarts of the daemon. See
}

ctx := context.Background()
repoDir, err := homedir.Expand(daemonFlags.repo)
var err error
daemonFlags.repo, err = homedir.Expand(daemonFlags.repo)
if err != nil {
log.Warnw("could not expand repo location", "error", err)
} else {
log.Infof("visor repo: %s", repoDir)
log.Infof("lily repo: %s", daemonFlags.repo)
}

r, err := repo.NewFS(daemonFlags.repo)
Expand All @@ -202,13 +203,13 @@ Note that jobs are not persisted between restarts of the daemon. See
}

if daemonFlags.config == "" {
daemonFlags.config = filepath.Join(repoDir, "config.toml")
daemonFlags.config = filepath.Join(daemonFlags.repo, "config.toml")
} else {
daemonFlags.config, err = homedir.Expand(daemonFlags.config)
if err != nil {
log.Warnw("could not expand repo location", "error", err)
} else {
log.Infof("visor config: %s", repoDir)
log.Infof("lily config: %s", daemonFlags.config)
}
}

Expand Down

0 comments on commit 282f0dd

Please sign in to comment.