mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-23 17:47:28 +08:00

* shortcut-fe: Remove unnecessary unloading. * luci-app-turboacc: add fullcone status sync
27 lines
506 B
Bash
Executable File
27 lines
506 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2021 Ailick <277498654@qq.com>
|
|
# For syncing status of firewall full-cone into turboacc.
|
|
|
|
START=60
|
|
STOP=10
|
|
SERVICE=turboacc_fss
|
|
|
|
USE_PROCD=1
|
|
|
|
service_triggers(){
|
|
procd_add_reload_trigger firewall
|
|
}
|
|
|
|
start_service(){
|
|
[ ! -e "/etc/init.d/turboacc" ] && stop
|
|
uci set turboacc.config.fullcone_nat="$(fullcone_status_get)" && uci commit turboacc
|
|
}
|
|
|
|
reload_service(){
|
|
start
|
|
}
|
|
|
|
fullcone_status_get(){
|
|
uci -q get firewall.@defaults[0].fullcone || echo 0
|
|
}
|