packages/rinetd: use new service functions
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29099 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
ad04b648d1
commit
a5c9c3954d
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2009 OpenWrt.org
|
# Copyright (C) 2009-2011 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=rinetd
|
PKG_NAME:=rinetd
|
||||||
PKG_VERSION:=0.62
|
PKG_VERSION:=0.62
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=rinetd.tar.gz
|
PKG_SOURCE:=rinetd.tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.boutell.com/rinetd/http
|
PKG_SOURCE_URL:=http://www.boutell.com/rinetd/http
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
# rinetd init script
|
# Copyright (C) 2009-2011 OpenWrt.org
|
||||||
# Copyright (C) 2009 OpenWrt.org
|
|
||||||
|
|
||||||
START=80
|
START=80
|
||||||
|
|
||||||
SSD=start-stop-daemon
|
|
||||||
BIN=/usr/sbin/rinetd
|
|
||||||
CFG=/var/etc/rinetd.conf
|
CFG=/var/etc/rinetd.conf
|
||||||
PID=/var/run/rinetd.pid
|
|
||||||
|
|
||||||
common_add() {
|
common_add() {
|
||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
@ -48,21 +44,21 @@ forward_add() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
mkdir -p /var/etc /var/run
|
mkdir -m 0755 -p /var/etc
|
||||||
|
mkdir -m 0755 -p /var/run
|
||||||
|
|
||||||
echo "# This file is autogenerated, use /etc/config/rinetd" > $CFG
|
echo "# This file is autogenerated, check /etc/config/rinetd" > $CFG
|
||||||
config_load rinetd
|
config_load 'rinetd'
|
||||||
config_foreach common_add common
|
config_foreach common_add 'common'
|
||||||
config_foreach forward_add forwarding
|
config_foreach forward_add 'forwarding'
|
||||||
|
|
||||||
$SSD -S -q -x $BIN -- -c $CFG
|
service_start /usr/sbin/rinetd -c $CFG
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
$SSD -K -q -p $PID -x $BIN
|
service_stop /usr/sbin/rinetd
|
||||||
rm -f $PID $CFG
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
$SSD -K -q -p $PID -x $BIN -s 1
|
service_reload /usr/sbin/rinetd
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user