summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-11-06 16:13:08 -0500
committerJune McEnroe <june@causal.agency>2019-11-06 16:13:08 -0500
commitf3b13a3f1fde68181db1952781962d01ebda40cd (patch)
treed86155322443781ee3ed2bc9c6c5335868b51d74
parentChange license to GPLv3 (diff)
downloadpounce-f3b13a3f1fde68181db1952781962d01ebda40cd.tar.gz
pounce-f3b13a3f1fde68181db1952781962d01ebda40cd.zip
Define one CERTBOT_PATH rather than two format strings
-rw-r--r--bounce.c10
-rw-r--r--bounce.h8
2 files changed, 10 insertions, 8 deletions
diff --git a/bounce.c b/bounce.c
index a381db3..93afbb4 100644
--- a/bounce.c
+++ b/bounce.c
@@ -303,10 +303,16 @@ int main(int argc, char *argv[]) {
 		}
 	}
 	if (!certPath[0]) {
-		snprintf(certPath, sizeof(certPath), DEFAULT_CERT_PATH, bindHost);
+		snprintf(
+			certPath, sizeof(certPath), CERTBOT_PATH "/live/%s/fullchain.pem",
+			bindHost
+		);
 	}
 	if (!privPath[0]) {
-		snprintf(privPath, sizeof(privPath), DEFAULT_PRIV_PATH, bindHost);
+		snprintf(
+			privPath, sizeof(privPath), CERTBOT_PATH "/live/%s/privkey.pem",
+			bindHost
+		);
 	}
 
 	if (!host) errx(EX_USAGE, "host required");
diff --git a/bounce.h b/bounce.h
index a46c7e4..37cfc7c 100644
--- a/bounce.h
+++ b/bounce.h
@@ -23,12 +23,8 @@
 
 #include "compat.h"
 
-#ifndef DEFAULT_CERT_PATH
-#define DEFAULT_CERT_PATH "/usr/local/etc/letsencrypt/live/%s/fullchain.pem"
-#endif
-
-#ifndef DEFAULT_PRIV_PATH
-#define DEFAULT_PRIV_PATH "/usr/local/etc/letsencrypt/live/%s/privkey.pem"
+#ifndef CERTBOT_PATH
+#define CERTBOT_PATH "/usr/local/etc/letsencrypt"
 #endif
 
 #define ARRAY_LEN(a) (sizeof(a) / sizeof(a[0]))
2017-09-03 14:57:17 -0400'>2017-09-03Relicense AGPLJune McEnroe 2017-09-01Revert "Add client readOnly mode"June McEnroe 2017-09-01Remove clientRemove call from clientCastJune McEnroe 2017-09-01Add client readOnly modeJune McEnroe 2017-08-31Clean up merge toolJune McEnroe 2017-08-31Choose B for tiles with equal modify timesJune McEnroe 2017-08-31Add quick data file merge toolJune McEnroe 2017-08-30Use only foreground color for selecting spawnJune McEnroe 2017-08-29Add four additional spawnsJune McEnroe 2017-08-28Add respawningJune McEnroe 2017-08-26Move license above includesJune McEnroe 2017-08-26Snapshot metadataJune McEnroe 2017-08-26Add meta.c to READMEJune McEnroe 2017-08-26Use MakefileJune McEnroe