🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
#!/bin/sh /etc/rc.common
START=97
STOP=01
USE_PROCD=1
PROG="/usr/bin/internet-detector"
run_instance() {
config_get enabled "$1" enabled "0"
if [ $enabled = "1" ]; then
procd_open_instance "$1"
procd_set_param command "$PROG" "-a" "nodaemon" "-i" "$1"
procd_set_param respawn
procd_set_param term_timeout 60
procd_close_instance
fi
}
start_service() {
config_load "internet-detector"
config_get mode "config" mode "0"
if [ $mode = "1" ]; then
config_foreach run_instance "instance"
fi
}
stop_service() {
$PROG -a stop
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "internet-detector"
}