From c2436aa59bc71ba2717675ac4619bc0aa92ec0f5 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sun, 16 Sep 2007 09:53:42 +0000 Subject: [PATCH] Add config and init files for iodined SVN-Revision: 8784 --- net/iodine/Makefile | 4 ++++ net/iodine/files/iodined.config | 5 +++++ net/iodine/files/iodined.init | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 net/iodine/files/iodined.config create mode 100644 net/iodine/files/iodined.init diff --git a/net/iodine/Makefile b/net/iodine/Makefile index e37c8a6e0..5eb854e38 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 000000000..f95549d7a --- /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 000000000..1eac80766 --- /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 +} -- 2.30.2