Permalink
Browse files

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

  • Loading branch information...
1 parent 94fb611 commit 7360f8f7d844022ed428c51b3178fd3cf6481dfc @nicolasff committed Jul 17, 2011
Showing with 42 additions and 0 deletions.
  1. +14 −0 Makefile
  2. +28 −0 webdis.prod.json
View
@@ -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
@@ -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"
+}

0 comments on commit 7360f8f

Please sign in to comment.