summaryrefslogtreecommitdiff
path: root/package/relayd/files/relay.sh
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2011-11-08 22:48:11 +0000
committerNicolas Thill <nico@openwrt.org>2011-11-08 22:48:11 +0000
commitf67f9ef9411bc89fd084dd6aadf45afe3cb713d5 (patch)
treebffc236aa12a59646656fcd9560ecacc0dcc0eed /package/relayd/files/relay.sh
parent72de194d1633e52b4000d9021e35a30716cfb21a (diff)
downloadmtk-20170518-f67f9ef9411bc89fd084dd6aadf45afe3cb713d5.zip
mtk-20170518-f67f9ef9411bc89fd084dd6aadf45afe3cb713d5.tar.gz
mtk-20170518-f67f9ef9411bc89fd084dd6aadf45afe3cb713d5.tar.bz2
package/relayd: use new service wrappers
SVN-Revision: 28869
Diffstat (limited to 'package/relayd/files/relay.sh')
-rw-r--r--package/relayd/files/relay.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/package/relayd/files/relay.sh b/package/relayd/files/relay.sh
index 390900b..9cfdbbb 100644
--- a/package/relayd/files/relay.sh
+++ b/package/relayd/files/relay.sh
@@ -76,8 +76,10 @@ setup_interface_relay() {
config_get_bool fwd_dhcp "$cfg" forward_dhcp 1
[ $fwd_dhcp -eq 1 ] && append args "-D"
- start-stop-daemon -b -S -m -p /var/run/$link.pid \
- -x /usr/sbin/relayd -- $args
+ SERVICE_DAEMONIZE=1 \
+ SERVICE_WRITE_PID=1 \
+ SERVICE_PID_FILE="/var/run/$link.pid" \
+ service_start /usr/sbin/relayd $args
uci_set_state network "$cfg" device "$ifaces"
@@ -92,6 +94,7 @@ stop_interface_relay() {
env -i ACTION="ifdown" DEVICE="$link" INTERFACE="$cfg" PROTO="relay" \
/sbin/hotplug-call iface
- service_kill relayd "/var/run/$link.pid"
+ SERVICE_PID_FILE="/var/run/$link.pid" \
+ service_stop /usr/sbin/relayd
}