1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-19 14:57:04 +00:00

config: Allow overrides from the command line

This patch allows the configuration values to be overridden from the
command-line, with a new -config_overrides flag.

There is a fairly specific use case for this, when editing the
configuration file is not feasible or convenient (e.g. running an
user-supplied configuration in a managed environment).
This commit is contained in:
Alberto Bertogli
2020-05-16 23:22:00 +01:00
parent 7909b479eb
commit 4c28efcb20
6 changed files with 54 additions and 14 deletions

View File

@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "chasquid 1"
.TH chasquid 1 "2018-07-22" "" ""
.TH chasquid 1 "2020-05-16" "" ""
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -154,6 +154,11 @@ It's written in Go, and distributed under the Apache license 2.0.
.IP "\fB\-config_dir\fR \fIdir\fR" 8
.IX Item "-config_dir dir"
configuration directory (default \fI/etc/chasquid\fR)
.IP "\fB\-config_overrides\fR \fIconfig\fR" 8
.IX Item "-config_overrides config"
configuration values (in text protobuf format) to override the on-disk
configuration with. This should only be needed in very specific cases for
deployments where editing the configuration file is not feasible.
.IP "\fB\-alsologtostderr\fR" 8
.IX Item "-alsologtostderr"
also log to stderr, in addition to the file

View File

@@ -22,6 +22,12 @@ It's written in Go, and distributed under the Apache license 2.0.
configuration directory (default F</etc/chasquid>)
=item B<-config_overrides> I<config>
configuration values (in text protobuf format) to override the on-disk
configuration with. This should only be needed in very specific cases for
deployments where editing the configuration file is not feasible.
=item B<-alsologtostderr>
also log to stderr, in addition to the file