v0.2.16 - fixed config bugs
This commit is contained in:
13
src/main.c
13
src/main.c
@@ -3113,12 +3113,8 @@ int main(int argc, char* argv[]) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Store database path override in configuration if specified
|
||||
if (database_path_override) {
|
||||
if (set_database_config("database_path", database_path_override, "command_line") != 0) {
|
||||
log_warning("Failed to store database path override in configuration");
|
||||
}
|
||||
}
|
||||
// Database path override is applied via environment variable - no need to store in config
|
||||
// (storing database path in database creates circular dependency)
|
||||
|
||||
// Initialize nostr library BEFORE configuration system
|
||||
// (required for Nostr event generation in config files)
|
||||
@@ -3140,11 +3136,10 @@ int main(int argc, char* argv[]) {
|
||||
if (port != DEFAULT_PORT) {
|
||||
log_info("Applying port override from command line");
|
||||
printf(" Port: %d\n", port);
|
||||
// Set environment variable for port override (runtime only, not persisted)
|
||||
char port_str[16];
|
||||
snprintf(port_str, sizeof(port_str), "%d", port);
|
||||
if (set_database_config("relay_port", port_str, "command_line") != 0) {
|
||||
log_warning("Failed to set port override in configuration");
|
||||
}
|
||||
setenv("C_RELAY_PORT_OVERRIDE", port_str, 1);
|
||||
}
|
||||
|
||||
// Initialize NIP-11 relay information
|
||||
|
||||
Reference in New Issue
Block a user