fine tune package, add example conf
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>
Wed, 14 Sep 2005 10:09:37 +0000 (10:09 +0000)
committerWaldemar Brodkorb <mail@waldemar-brodkorb.de>
Wed, 14 Sep 2005 10:09:37 +0000 (10:09 +0000)
SVN-Revision: 1916

openwrt/package/srelay/Makefile
openwrt/package/srelay/files/S60srelay [deleted file]
openwrt/package/srelay/files/srelay.conf [new file with mode: 0644]
openwrt/package/srelay/files/srelay.init [new file with mode: 0755]

index 6fde1138735b156fa31ef153428781838d6c64a9..485ea26abef13d9f82e0e36ea09d5ed8d9f78fd9 100644 (file)
@@ -13,6 +13,7 @@ PKG_CAT:=zcat
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_INIT_LEVEL:=60
 
 include $(TOPDIR)/package/rules.mk
 
@@ -58,8 +59,9 @@ $(PKG_BUILD_DIR)/.built:
 $(IPKG_SRELAY):
        install -m0755 -d $(IDIR_SRELAY)/usr/bin
        install -m0755 -d $(IDIR_SRELAY)/etc/init.d
-       cp $(PKG_INSTALL_DIR)/srelay $(IDIR_SRELAY)/usr/bin/
-       cp files/S60srelay $(IDIR_SRELAY)/etc/init.d
-       chmod 755 $(IDIR_SRELAY)/etc/init.d/S60srelay
+       cp -fpR $(PKG_INSTALL_DIR)/srelay $(IDIR_SRELAY)/usr/bin/
+       cp -fpR files/srelay.init $(IDIR_SRELAY)/etc/init.d/S$(PKG_INIT_LEVEL)srelay
+       cp -fpR files/srelay.conf $(IDIR_SRELAY)/etc
+       chmod 755 $(IDIR_SRELAY)/etc/init.d/S$(PKG_INIT_LEVEL)srelay
        $(RSTRIP) $(IDIR_SRELAY)
        $(IPKG_BUILD) $(IDIR_SRELAY) $(PACKAGE_DIR)
diff --git a/openwrt/package/srelay/files/S60srelay b/openwrt/package/srelay/files/S60srelay
deleted file mode 100755 (executable)
index 9e5a5f5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-if [ -f /etc/srelay.conf ];then
-       srelay -c /etc/srelay.conf -r -s 
-fi
diff --git a/openwrt/package/srelay/files/srelay.conf b/openwrt/package/srelay/files/srelay.conf
new file mode 100644 (file)
index 0000000..e5d53ec
--- /dev/null
@@ -0,0 +1,2 @@
+# allow local subnet to access socks proxy
+192.168.1.0/24 any -
diff --git a/openwrt/package/srelay/files/srelay.init b/openwrt/package/srelay/files/srelay.init
new file mode 100755 (executable)
index 0000000..9e5a5f5
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ -f /etc/srelay.conf ];then
+       srelay -c /etc/srelay.conf -r -s 
+fi