00be7967387d5c95a0c3387c0519c99dbd11bcff

Author
Ayman Bagabas <ayman.bagabas@gmail.com>
Committer
Ayman Bagabas <ayman.bagabas@gmail.com>
Date

Message

fix(config): add default values for the enabled fields

Fixes: 069db2777dfb (feat: support toggling servers on/off in configuration (#594) (#612))

Diff

 1diff --git a/pkg/config/file.go b/pkg/config/file.go
 2index 4bb0302db0f76b5197b6528345c254abc427703c..55e45c76d75a85da211bf0d9e7113e95f3e4404f 100644
 3--- a/pkg/config/file.go
 4+++ b/pkg/config/file.go
 5@@ -23,6 +23,9 @@ log:
 6 
 7 # The SSH server configuration.
 8 ssh:
 9+  # Enable SSH.
10+  enabled: {{ .SSH.Enabled }}
11+
12   # The address on which the SSH server will listen.
13   listen_addr: "{{ .SSH.ListenAddr }}"
14 
15@@ -47,6 +50,9 @@ ssh:
16 
17 # The Git daemon configuration.
18 git:
19+  # Enable the Git daemon.
20+  enabled: {{ .Git.Enabled }}
21+
22   # The address on which the Git daemon will listen.
23   listen_addr: "{{ .Git.ListenAddr }}"
24 
25@@ -66,6 +72,9 @@ git:
26 
27 # The HTTP server configuration.
28 http:
29+  # Enable the HTTP server.
30+  enabled: {{ .HTTP.Enabled }}
31+
32   # The address on which the HTTP server will listen.
33   listen_addr: "{{ .HTTP.ListenAddr }}"
34 
35@@ -82,6 +91,9 @@ http:
36 
37 # The stats server configuration.
38 stats:
39+  # Enable the stats server.
40+  enabled: {{ .Stats.Enabled }}
41+
42   # The address on which the stats server will listen.
43   listen_addr: "{{ .Stats.ListenAddr }}"
44