about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-11 15:17:42 -0400
committerJune McEnroe <june@causal.agency>2020-07-11 15:17:42 -0400
commitc1178a287fac80182714d8782a57dbf32bf5e815 (patch)
treeb4b2a184c70f81f5a25ef5dab9967e4a1a2fd157
parentPreserve search query when clicking network or context columns (diff)
downloadscooper-c1178a287fac80182714d8782a57dbf32bf5e815.tar.gz
scooper-c1178a287fac80182714d8782a57dbf32bf5e815.zip
Remove -f option
I missed that there was a function to automatically detect if it's
FastCGI!
Diffstat (limited to '')
-rw-r--r--scooper.110
-rw-r--r--server.c6
2 files changed, 5 insertions, 11 deletions
diff --git a/scooper.1 b/scooper.1
index c05676b..88f1110 100644
--- a/scooper.1
+++ b/scooper.1
@@ -1,4 +1,4 @@
-.Dd July 10, 2020
+.Dd July 11, 2020
 .Dt SCOOPER 1
 .Os
 .
@@ -8,7 +8,7 @@
 .
 .Sh SYNOPSIS
 .Nm
-.Op Fl fp
+.Op Fl p
 .Op Fl l Ar limit
 .Op Fl r Ar recent
 .Op Fl s Ar url
@@ -35,11 +35,6 @@ Prepare all SQL statements against the given
 .Ar database
 and exit.
 .
-.It Fl f
-Become a FastCGI worker,
-which can be managed by
-.Xr kfcgi 8 .
-.
 .It Fl l Ar limit
 Limit the number of events
 to be displayed on one page.
@@ -66,6 +61,7 @@ database.
 .El
 .
 .Sh SEE ALSO
+.Xr kfcgi 8 ,
 .Xr litterbox 1
 .
 .Sh AUTHORS
diff --git a/server.c b/server.c
index afbf238..e3261be 100644
--- a/server.c
+++ b/server.c
@@ -75,13 +75,11 @@ static enum kcgi_err request(struct kreq *req) {
 }
 
 int main(int argc, char *argv[]) {
-	bool fastCGI = false;
 	bool test = false;
 
-	for (int opt; 0 < (opt = getopt(argc, argv, "cfl:pr:s:"));) {
+	for (int opt; 0 < (opt = getopt(argc, argv, "cl:pr:s:"));) {
 		switch (opt) {
 			break; case 'c': test = true;
-			break; case 'f': fastCGI = true;
 			break; case 'l': pageLimit = strtol(optarg, NULL, 10);
 			break; case 'p': pagePublic = true;
 			break; case 'r': pageRecent = strtol(optarg, NULL, 10);
@@ -118,7 +116,7 @@ int main(int argc, char *argv[]) {
 	
 	if (test) return EX_OK;
 	
-	if (fastCGI) {
+	if (khttp_fcgi_test()) {
 		struct kfcgi *fcgi;
 		enum kcgi_err error = khttp_fcgi_init(
 			&fcgi, Keys, KeysLen, Pages, PagesLen, Networks