summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index db55e08..668bdbf 100644
--- a/src/main.c
+++ b/src/main.c
@@ -343,15 +343,19 @@ int main (int argc, char **argv) {
#endif
PianoInit (&app.ph);
+ BarSettingsInit (&app.settings);
+ BarSettingsRead (&app.settings);
+
+#ifdef ENABLE_TLS
+ WaitressInit (&app.waith, app.settings.tlsCaPath);
+#else
WaitressInit (&app.waith, NULL);
+#endif
app.waith.url.host = strdup (PIANO_RPC_HOST);
#ifdef ENABLE_TLS
- app.waith.url.tls = true;
+ app.waith.url.tls = app.settings.tls;
#endif
- BarSettingsInit (&app.settings);
- BarSettingsRead (&app.settings);
-
BarUiMsg (&app.settings, MSG_NONE,
"Welcome to " PACKAGE " (" VERSION ")! ");
if (app.settings.keys[BAR_KS_HELP] == BAR_KS_DISABLED) {