💋 Sync 2026-10-04 04:16:09

This commit is contained in:
github-actions[bot] committed 2026-10-04 04:16:09 +08:00
1 parent f6b2df73ec
commit f62992fd80
745 files changed
+212416 -1173

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
NAME=devgate
start_service() {
procd_open_instance
procd_set_param command /usr/bin/devgatectrl
procd_set_param respawn
procd_set_param stderr 1
procd_close_instance
}
service_triggers() {
procd_add_reload_trigger 'devgate'
}
reload_service() {
touch "/var/$NAME.reload"
pidof devgatectrl >/dev/null 2>&1 || start_service
return 0
}
stop_service(){
local pids
pids="$(pidof devgatectrl 2>/dev/null)"
[ -n "$pids" ] && kill $pids >/dev/null 2>&1
[ -x /usr/bin/devgate ] && /usr/bin/devgate stop || true
}
@@ -0,0 +1,33 @@
#!/bin/sh
[ ! -f "/usr/share/ucitrack/luci-app-devgate.json" ] && {
cat > /usr/share/ucitrack/luci-app-devgate.json << EEOF
{
"config": "devgate",
"init": "devgate"
}
EEOF
}
chmod +x /etc/init.d/devgate /usr/bin/devgate*
uci -q batch <<-EOF >/dev/null
delete ucitrack.@devgate[-1]
add ucitrack devgate
set ucitrack.@devgate[-1].init=devgate
commit ucitrack
EOF
[ -e /etc/config/devgate ] || cat > /etc/config/devgate <<'EOF'
config device
option enable '0'
option mac ''
option time_ranges '00:00-00:00'
option week '0'
option chain 'forward'
EOF
rm -f /etc/config/devgate-opkg
/etc/init.d/devgate enable >/dev/null 2>&1 || true
/etc/init.d/devgate start >/dev/null 2>&1 || true
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache /tmp/luci-*cache
/etc/init.d/rpcd reload >/dev/null 2>&1 || true
exit 0