mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
* shortcut-fe: Remove unnecessary unloading. * luci-app-turboacc: add fullcone status sync
This commit is contained in:
parent
b947b26d6b
commit
7f7366334c
@ -230,10 +230,19 @@ start(){
|
||||
uci set firewall.@defaults[0].fullcone="${fullcone_nat}"
|
||||
uci commit firewall
|
||||
|
||||
[ "${sw_flow}" -ne "1" ] && [ "${sfe_flow}" -eq "1" ] && {
|
||||
[ "$(have_ecm_init)" = "0" ] && {
|
||||
/etc/init.d/shortcut-fe enabled || /etc/init.d/shortcut-fe enable
|
||||
/etc/init.d/shortcut-fe start
|
||||
/etc/init.d/turboacc_fss start
|
||||
|
||||
[ "${sw_flow}" -ne "1" ] && {
|
||||
[ "${sfe_flow}" -eq "1" ] && {
|
||||
[ "$(have_ecm_init)" = "0" ] && {
|
||||
/etc/init.d/shortcut-fe enabled || /etc/init.d/shortcut-fe enable
|
||||
/etc/init.d/shortcut-fe start
|
||||
}
|
||||
}
|
||||
[ "${sfe_flow}" -eq "0" ] && [ -e "/etc/init.d/shortcut-fe" ] && [ "$(have_ecm_init)" = "0" ] && \
|
||||
/etc/init.d/shortcut-fe enabled && {
|
||||
/etc/init.d/shortcut-fe stop 2>"/dev/null"
|
||||
/etc/init.d/shortcut-fe disable
|
||||
}
|
||||
}
|
||||
|
||||
|
26
package/lean/luci-app-turboacc/root/etc/init.d/turboacc_fss
Executable file
26
package/lean/luci-app-turboacc/root/etc/init.d/turboacc_fss
Executable file
@ -0,0 +1,26 @@
|
||||
#!/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
|
||||
}
|
@ -46,6 +46,4 @@ stop() {
|
||||
[ -d "/sys/module/shortcut_fe_drv" ] && rmmod shortcut_fe_drv
|
||||
[ -d "/sys/module/shortcut_fe_cm" ] && rmmod shortcut_fe_cm
|
||||
[ -d "/sys/module/fast_classifier" ] && rmmod fast_classifier
|
||||
[ -d "/sys/module/shortcut_fe_ipv6" ] && rmmod shortcut-fe-ipv6
|
||||
[ -d "/sys/module/shortcut_fe" ] && rmmod shortcut-fe
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user