relayd: remove old start-stop-service related code
authorYousong Zhou <yszhou4tech@gmail.com>
Sat, 25 Feb 2017 12:00:14 +0000 (20:00 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Sat, 25 Feb 2017 12:16:59 +0000 (20:16 +0800)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
package/network/services/relayd/files/relay.init

index 028b61ea360f6caff193c32867c24d39e7d6e968..ac10f48b70acaed3213d2f207a3bdea7f7575a06 100644 (file)
@@ -21,7 +21,6 @@ resolve_ifname() {
        grep -qs "^ *$1:" /proc/net/dev && {
                procd_append_param command -I "$1"
                procd_append_param netdev "$1"
-               append ifaces "$1"
        }
 }
 
@@ -36,26 +35,12 @@ resolve_network() {
 start_relay() {
        local cfg="$1"
 
-       local args=""
-       local ifaces=""
-
        config_get proto "$cfg" proto
        [ "$proto" = "relay" ] || return 0
 
        config_get_bool disabled "$cfg" disabled 0
        [ "$disabled" -gt 0 ] && return 0
 
-       SERVICE_DAEMONIZE=1
-       SERVICE_WRITE_PID=1
-       SERVICE_PID_FILE="/var/run/relay-$cfg.pid"
-       [ -f "$SERVICE_PID_FILE" ] && {
-               if grep -q relayd "/proc/$(cat $SERVICE_PID_FILE)/cmdline"; then
-                       return 0
-               else
-                       rm -f "$SERVICE_PID_FILE"
-               fi
-       }
-
        procd_open_instance
        procd_set_param command "$PROG"