feat(d5-daemon-core): daemon lifecycle, module config, ::dest, PROTOCOL 2.15.0
This commit is contained in:
+10
-1
@@ -1485,7 +1485,6 @@ int main(int argc, char* argv[]) {
|
||||
goto cleanup;
|
||||
}
|
||||
config->save_to_disk = true;
|
||||
config_parse_ssh_dest(config);
|
||||
} else if (positional_count == 1) {
|
||||
log_message(LOG_LEVEL_ERROR, "missing destination argument");
|
||||
print_usage();
|
||||
@@ -1510,6 +1509,16 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Resolve the destination's transport form after the source/destination are
|
||||
* final (positional, --dest-dir, or the FASTSYNC_DEST_DIR env fallback):
|
||||
* host::module[/path] selects the daemon TCP transport, host:path the SSH
|
||||
* transport, anything else stays local TCP. An invalid daemon destination
|
||||
* already logged its reason and is a hard error here. */
|
||||
if (config_parse_transport_dest(config) < 0) {
|
||||
exit_code = 1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!validate_config(config)) {
|
||||
exit_code = 1;
|
||||
goto cleanup;
|
||||
|
||||
@@ -11,6 +11,9 @@ void print_usage(void) {
|
||||
printf("Destination formats:\n");
|
||||
printf(" user@host:/path SSH transport (rsync-style)\n");
|
||||
printf(" host:/path SSH transport (current user)\n");
|
||||
printf(" host::module/path Daemon TCP transport (fastsync-server --daemon);\n");
|
||||
printf(" module names a server-side module, path is relative\n");
|
||||
printf(" within it (connect with --server-port)\n");
|
||||
printf(" /local/path TCP transport (requires server on localhost:8080)\n");
|
||||
printf("\n");
|
||||
printf("Options:\n");
|
||||
|
||||
Reference in New Issue
Block a user