Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added fix-config.diff and install-target.diff by @jollyroger.

  • Loading branch information...
commit 7360f8f7d844022ed428c51b3178fd3cf6481dfc 1 parent 94fb611
@nicolasff authored
Showing with 42 additions and 0 deletions.
  1. +14 −0 Makefile
  2. +28 −0 webdis.prod.json
View
14 Makefile
@@ -9,6 +9,14 @@ OBJS=webdis.o cmd.o worker.o slog.o server.o libb64/cencode.o acl.o md5/md5.o ht
CFLAGS=-O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser
LDFLAGS=-levent -pthread
+PREFIX ?= /usr/local
+CONFDIR ?= $(DESTDIR)/etc
+
+INSTALL_DIRS = $(DESTDIR) \
+ $(DESTDIR)/$(PREFIX) \
+ $(DESTDIR)/$(PREFIX)/bin \
+ $(CONFDIR)
+
all: $(OUT) Makefile
$(OUT): $(OBJS) Makefile
@@ -20,6 +28,12 @@ $(OUT): $(OBJS) Makefile
%.o: %.c Makefile
$(CC) -c $(CFLAGS) -o $@ $<
+$(INSTALL_DIRS):
+ mkdir -p $@
+
clean:
rm -f $(OBJS) $(OUT)
+install: $(OUT) $(INSTALL_DIRS)
+ cp $(OUT) $(DESTDIR)/$(PREFIX)/bin
+ cp webdis.prod.json $(CONFDIR)
View
28 webdis.prod.json
@@ -0,0 +1,28 @@
+{
+ "redis_host": "127.0.0.1",
+
+ "redis_port": 6379,
+ "redis_auth": null,
+
+ "http_host": "0.0.0.0",
+ "http_port": 7379,
+ "threads": 4,
+
+ "daemonize": true,
+
+ "database": 0,
+
+ "acl": [
+ {
+ "disabled": ["DEBUG"]
+ },
+
+ {
+ "http_basic_auth": "user:password",
+ "enabled": ["DEBUG"]
+ }
+ ],
+
+ "verbosity": 3,
+ "logfile": "/var/log/webdis.log"
+}
Please sign in to comment.
Something went wrong with that request. Please try again.