1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-14 11:23:57 +02:00
openwrt-packages/net/udhcpsnoop/files/etc/init.d/dhcpsnoop
David Bauer b24ff2e1e0 udhcpsnoop: import package from TIP
Import the udhcpsnoop package from the TIP feed.

The original Makefile in TIP repo spcifies GPL-2.0 as the PKG_LICENSE.
However this is a mistake, as the SPDX headers of the repos source files
all specify BSD-3-Clause as their license.

See https://github.com/Telecominfraproject/wlan-ap/blob/uCentral-trunk/feeds/ucentral/udhcpsnoop/Makefile

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-06-29 18:55:24 +02:00

23 lines
352 B
Bash
Executable File

#!/bin/sh /etc/rc.common
START=80
USE_PROCD=1
PROG=/usr/sbin/udhcpsnoop
service_triggers() {
procd_add_reload_trigger dhcpsnoop
}
start_service() {
[ "$(uci get dhcpsnoop.@snooping[-1].enable)" -eq 1 ] || return
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance
}
reload_service() {
restart
}