From: Florian Fainelli Date: Sun, 16 Sep 2007 09:53:42 +0000 (+0000) Subject: Add config and init files for iodined X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=2f0c40245e4f5d839e64fb1bc0f873118a372260;hp=038e9b971caa1ce54771cad280fe001215c38608 Add config and init files for iodined SVN-Revision: 8784 --- diff --git a/net/iodine/Makefile b/net/iodine/Makefile index e37c8a6e09..5eb854e385 100644 --- a/net/iodine/Makefile +++ b/net/iodine/Makefile @@ -61,6 +61,10 @@ define Package/iodine/install endef define Package/iodined/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/iodined.init $(1)/etc/init.d/iodined + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/iodined.config $(1)/etc/config/iodined $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/iodined $(1)/usr/sbin endef diff --git a/net/iodine/files/iodined.config b/net/iodine/files/iodined.config new file mode 100644 index 0000000000..f95549d7a5 --- /dev/null +++ b/net/iodine/files/iodined.config @@ -0,0 +1,5 @@ +config iodined + option address '' + option password '' + option tunnelip '10.0.0.1' + option tld '' diff --git a/net/iodine/files/iodined.init b/net/iodine/files/iodined.init new file mode 100644 index 0000000000..1eac807661 --- /dev/null +++ b/net/iodine/files/iodined.init @@ -0,0 +1,22 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=50 + +start_service () { + local section="$1" + config_get address "$section" address + config_get password "$section" password + config_get tunnelip "$section" tunnelip + config_get tld "$section" tld + + iodined -l $address -P $password $tunnelip $tld +} + +start() { + config_load "iodined" + config_foreach start_service iodined +} + +stop() { + killall iodined +}