mirror of
https://github.com/LowderPlay/cheburcheck.git
synced 2026-10-12 09:08:18 +03:00
* feat: autoupdate * chore: bump version * feat: publish installer * fix: standalone builds * ci: release docs * fix: windows icmp socket * docs: windows notice * docs: remove line breaks
26 lines
586 B
Bash
26 lines
586 B
Bash
#!/bin/sh /etc/rc.common
|
|
|
|
START=96
|
|
STOP=9
|
|
USE_PROCD=1
|
|
|
|
start_service() {
|
|
config_load cheburprobe
|
|
config_get_bool auto_update main auto_update 1
|
|
[ "$auto_update" -eq 1 ] || return 0
|
|
config_get update_interval main update_interval 21600
|
|
initial_delay=300
|
|
|
|
procd_open_instance
|
|
procd_set_param command /bin/sh -c \
|
|
"sleep $initial_delay; while :; do /usr/bin/cheburprobe update; sleep $update_interval; done"
|
|
procd_set_param respawn 3600 5 5
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_close_instance
|
|
}
|
|
|
|
service_triggers() {
|
|
procd_add_reload_trigger cheburprobe
|
|
}
|