mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
wifidog-ng: update to 1.2.4
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
This commit is contained in:
Executable → Regular
+2
@@ -20,3 +20,5 @@ config authserver
|
||||
config popularserver
|
||||
list server www.baidu.com
|
||||
list server www.qq.com
|
||||
|
||||
config whitelist
|
||||
|
||||
Executable → Regular
@@ -5,9 +5,30 @@ START=95
|
||||
|
||||
BIN=/usr/bin/wifidog-ng
|
||||
|
||||
parse_whitelist() {
|
||||
local cfg="$1"
|
||||
local domain mac
|
||||
|
||||
uci_validate_section wifidog-ng whitelist "${1}" \
|
||||
'domain:list(host)' \
|
||||
'mac:list(macaddr)'
|
||||
|
||||
[ $? -ne 0 ] && {
|
||||
echo "validation failed" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
for m in $mac; do
|
||||
echo "!$m" > /proc/wifidog-ng/term
|
||||
done
|
||||
}
|
||||
|
||||
start_service() {
|
||||
modprobe wifidog-ng
|
||||
|
||||
config_load wifidog-ng
|
||||
config_foreach parse_whitelist whitelist
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $BIN
|
||||
procd_set_param respawn
|
||||
|
||||
Executable → Regular
Reference in New Issue
Block a user