upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/main/tollgate_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/tollgate_main.c')
-rw-r--r--main/tollgate_main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/main/tollgate_main.c b/main/tollgate_main.c
index c0ff65f..5f3e0e1 100644
--- a/main/tollgate_main.c
+++ b/main/tollgate_main.c
@@ -22,6 +22,7 @@
22#include "wifistr.h" 22#include "wifistr.h"
23#include "tollgate_client.h" 23#include "tollgate_client.h"
24#include "lightning_payout.h" 24#include "lightning_payout.h"
25#include "mint_health.h"
25#include "cvm_server.h" 26#include "cvm_server.h"
26#include "display.h" 27#include "display.h"
27 28
@@ -151,7 +152,15 @@ static void start_services(void)
151 session_manager_init(); 152 session_manager_init();
152 153
153 const tollgate_config_t *cfg = tollgate_config_get(); 154 const tollgate_config_t *cfg = tollgate_config_get();
154 nucula_wallet_init(cfg->mint_url); 155
156 mint_health_init(cfg->accepted_mints, cfg->accepted_mint_count);
157 mint_health_start();
158
159 if (cfg->accepted_mint_count > 1) {
160 nucula_wallet_init_multi(cfg->accepted_mints, cfg->accepted_mint_count);
161 } else {
162 nucula_wallet_init(cfg->mint_url);
163 }
155 lightning_payout_init(&cfg->payout); 164 lightning_payout_init(&cfg->payout);
156 165
157 dns_server_start(ap_ip_info.ip, upstream_dns); 166 dns_server_start(ap_ip_info.ip, upstream_dns);
@@ -187,6 +196,7 @@ static void stop_services(void)
187 captive_portal_stop(); 196 captive_portal_stop();
188 tollgate_api_stop(); 197 tollgate_api_stop();
189 dns_server_stop(); 198 dns_server_stop();
199 mint_health_stop();
190 cvm_server_stop(); 200 cvm_server_stop();
191 firewall_revoke_all(); 201 firewall_revoke_all();
192 s_services_running = false; 202 s_services_running = false;