include $(TOPDIR)/rules.mk
PKG_NAME:=crelay
-PKG_VERSION:=0.10
+PKG_VERSION:=0.10.1
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
#!/bin/sh /etc/rc.common
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2016 OpenWrt.org
NAME=crelay
START=93
procd_set_param respawn
procd_set_param command "$PROG"
- # daemon mode (not daemonized) - starts HTTP server
+ # daemon mode in foreground - starts HTTP server
procd_append_param command -d
procd_close_instance
+++ /dev/null
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -64,7 +64,7 @@ all: $(BIN)
-
- $(BIN): $(OBJ)
- @echo "[Link $(BIN)] with libs $(LIBS)"
-- @$(CC) -o $(BIN) $(OBJ) $(LIBS)
-+ @$(CC) -o $(BIN) $(OBJ) $(LDFLAGS) $(LIBS)
-
- .c.o:
- @echo "[Compile $<]"
+++ /dev/null
---- a/src/crelay.c
-+++ b/src/crelay.c
-@@ -678,10 +678,12 @@ int main(int argc, char *argv[])
- listen(sock, 5);
- syslog(LOG_DAEMON | LOG_NOTICE, "HTTP server listening on %s:%d\n", inet_ntoa(iface), port);
-
-+#if 0
- if (daemon(0, 0) == -1) {
- syslog(LOG_DAEMON | LOG_ERR, "Failed to daemonize: %s", strerror(errno));
- exit(EXIT_FAILURE);
- }
-+#endif
-
- while (1)
- {