syncthing/cmd/syncthing
André Colomb 100870e142
cmd/syncthing: Implement generate as a subcommand with optional API credential setting (fixes #8021) (#8043)
Accept a subcommand as an alternative to the --generate option.  It
accepts a custom config directory through either the --home or
--config options, using the default location if neither is given.

Add the options --gui-user and --gui-password to "generate", but not
the "serve --generate" option form.  If either is given, an existing
config will not abort the command, but rather load, modify and save it
with the new credentials.  The password can be read from standard
input by passing only a single dash as argument.

Config modification is skipped if the value matches what's already in
the config.

* cmd/syncthing: Utilize lib/locations package in generate().
Instead of manually joining paths with "magic" file names, get them
from the centralized locations helper lib.

* cmd/syncthing: Simplify logging for --generate option.
Visible change: No more timestamp prefixes.
2021-11-18 22:57:59 +01:00
..
cli Normalize CLI options to always use two dashes. (#8037) 2021-11-04 08:42:55 +01:00
cmdutil cmd/syncthing: Implement generate as a subcommand with optional API credential setting (fixes #8021) (#8043) 2021-11-18 22:57:59 +01:00
decrypt Normalize CLI options to always use two dashes. (#8037) 2021-11-04 08:42:55 +01:00
generate cmd/syncthing: Implement generate as a subcommand with optional API credential setting (fixes #8021) (#8043) 2021-11-18 22:57:59 +01:00
.gitignore Repair model tests 2014-03-30 21:59:40 +02:00
.stfolder Merge remote-tracking branch 'syncthing/pr/1577' 2015-04-06 20:53:32 +02:00
blockprof.go cmd/syncthing: Refactor command line parsing (#7330) 2021-02-10 20:35:37 +01:00
crash_reporting_test.go lib/ur: Implement crash (panic) reporting (fixes #959) (#5702) 2019-06-11 08:19:11 +02:00
crash_reporting.go lib/ur: Implement crash (panic) reporting (fixes #959) (#5702) 2019-06-11 08:19:11 +02:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
heapprof.go cmd/syncthing: Refactor command line parsing (#7330) 2021-02-10 20:35:37 +01:00
main.go cmd/syncthing: Implement generate as a subcommand with optional API credential setting (fixes #8021) (#8043) 2021-11-18 22:57:59 +01:00
monitor_test.go cmd/syncthing: Do not truncate/rotate logs at start (#6359) 2020-02-26 13:49:03 +01:00
monitor.go all: Unused args, retvals, assignments (#7926) 2021-09-08 00:11:16 +02:00
openurl_unix.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
openurl_windows.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
perfstats_unix.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
perfstats_unsupported.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
traceback.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00