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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/tollgate_main.c b/main/tollgate_main.c
index 3f83923..6adb0ec 100644
--- a/main/tollgate_main.c
+++ b/main/tollgate_main.c
@@ -21,6 +21,7 @@
21#include "wifistr.h" 21#include "wifistr.h"
22#include "tollgate_client.h" 22#include "tollgate_client.h"
23#include "lightning_payout.h" 23#include "lightning_payout.h"
24#include "cvm_server.h"
24 25
25#define MAX_STA_RETRY 5 26#define MAX_STA_RETRY 5
26static const char *TAG = "tollgate_main"; 27static const char *TAG = "tollgate_main";
@@ -146,6 +147,12 @@ static void start_services(void)
146 147
147 xTaskCreate(publish_wifistr_task, "wifistr_init", 16384, NULL, 3, NULL); 148 xTaskCreate(publish_wifistr_task, "wifistr_init", 16384, NULL, 3, NULL);
148 149
150 const tollgate_config_t *cfg2 = tollgate_config_get();
151 if (cfg2->cvm_enabled) {
152 cvm_server_init();
153 cvm_server_start();
154 }
155
149 s_services_running = true; 156 s_services_running = true;
150 if (s_services_mutex) xSemaphoreGive(s_services_mutex); 157 if (s_services_mutex) xSemaphoreGive(s_services_mutex);
151 ESP_LOGI(TAG, "=== TollGate services started ==="); 158 ESP_LOGI(TAG, "=== TollGate services started ===");
@@ -162,6 +169,7 @@ static void stop_services(void)
162 captive_portal_stop(); 169 captive_portal_stop();
163 tollgate_api_stop(); 170 tollgate_api_stop();
164 dns_server_stop(); 171 dns_server_stop();
172 cvm_server_stop();
165 firewall_disable_nat(); 173 firewall_disable_nat();
166 firewall_revoke_all(); 174 firewall_revoke_all();
167 s_services_running = false; 175 s_services_running = false;