mirror of
https://git.freecumextremist.com/icscarythings/treebird-docker.git
synced 2024-11-16 19:24:16 +00:00
ICScaryThings
2c090f71df
I patched neko's code to use getenv() to grab instance url at startup and store it as a global rather than static const.
29 lines
640 B
Diff
29 lines
640 B
Diff
diff --git a/src/main.c b/src/main.c
|
|
index fc5cc79..6f3d8bc 100644
|
|
--- a/src/main.c
|
|
+++ b/src/main.c
|
|
@@ -20,7 +20,6 @@
|
|
#include <string.h>
|
|
#include <mastodont.h>
|
|
#include <stdlib.h>
|
|
-#include "../config.h"
|
|
#include "index.h"
|
|
#include "page_config.h"
|
|
#include "path.h"
|
|
@@ -41,10 +40,16 @@
|
|
#include "local_config_set.h"
|
|
#include "global_cache.h"
|
|
|
|
+// global accessed elsewhere via extern def in config.h
|
|
+char* config_instance_url = NULL;
|
|
+
|
|
int main(void)
|
|
{
|
|
unsigned run_count = 1;
|
|
|
|
+ // Env config
|
|
+ config_instance_url = getenv("TREEBIRD_CFG_INSTANCE_URL");
|
|
+
|
|
// Global init
|
|
mastodont_global_curl_init();
|
|
|