From 0727f5937715669ed2e5153b6f658949fb906c36 Mon Sep 17 00:00:00 2001 From: halosghost Date: Wed, 17 Oct 2018 18:45:47 -0500 Subject: [PATCH] preliminarily remove all conf files in favor of inline config --- Makefile | 2 -- conf/hgredirector.conf | 1 - conf/hgweb.conf | 1 - src/main.c | 6 +++++- src/redirector.c | 6 +++++- 5 files changed, 10 insertions(+), 6 deletions(-) delete mode 100644 conf/hgredirector.conf delete mode 100644 conf/hgweb.conf diff --git a/Makefile b/Makefile index f22fb06..7124b2b 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,6 @@ res: dist @cp -a --no-preserve=ownership pages dist/ @cp -a --no-preserve=ownership media dist/ @cp -a --no-preserve=ownership assets dist/ - @cp -a --no-preserve=ownership conf/* dist/ minify: res @(cd dist; \ @@ -74,7 +73,6 @@ deploy: uninstall: @rm -rf -- $(MAINDIR)/{assets,media,pages,.well-known} - @rm -f -- $(MAINDIR)/{$(PROGNM),hgredirector}{,.conf} @rm -f -- $(SVCDIR)/{$(PROGNM),hgredirector}.service @rm -f -- $(BINDIR)/website diff --git a/conf/hgredirector.conf b/conf/hgredirector.conf deleted file mode 100644 index 4e8f9ba..0000000 --- a/conf/hgredirector.conf +++ /dev/null @@ -1 +0,0 @@ -listener *:8080 {} diff --git a/conf/hgweb.conf b/conf/hgweb.conf deleted file mode 100644 index 708050b..0000000 --- a/conf/hgweb.conf +++ /dev/null @@ -1 +0,0 @@ -listener *:8443 {} diff --git a/src/main.c b/src/main.c index a1bf479..a226c8b 100644 --- a/src/main.c +++ b/src/main.c @@ -4,7 +4,11 @@ signed main (void) { struct lwan l; - lwan_init(&l); + struct lwan_config conf = *lwan_get_default_config(); + conf.listener = "0.0.0.0:8443"; + lwan_init_with_config(&l, &conf); + + //lwan_straitjacket_enforce(&jacket); signed errsv = EXIT_SUCCESS; diff --git a/src/redirector.c b/src/redirector.c index 3b1e0cc..df6e8c5 100644 --- a/src/redirector.c +++ b/src/redirector.c @@ -4,7 +4,11 @@ signed main (void) { struct lwan l; - lwan_init(&l); + struct lwan_config conf = *lwan_get_default_config(); + conf.listener = "0.0.0.0:8080"; + lwan_init_with_config(&l, &conf); + + //lwan_straitjacket_enforce(&jacket); #define ACMEDIR "/.well-known/acme-challenge"