Add config and init files for iodined
git-svn-id: svn://svn.openwrt.org/openwrt/packages@8784 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
09f932629a
commit
4539071e0d
@ -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
|
||||
|
5
net/iodine/files/iodined.config
Normal file
5
net/iodine/files/iodined.config
Normal file
@ -0,0 +1,5 @@
|
||||
config iodined
|
||||
option address ''
|
||||
option password ''
|
||||
option tunnelip '10.0.0.1'
|
||||
option tld ''
|
22
net/iodine/files/iodined.init
Normal file
22
net/iodine/files/iodined.init
Normal file
@ -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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user