mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-05 01:44:16 +08:00
🤞 Sync 2026-09-27 22:16:29
This commit is contained in:
1 parent
8ede4a8320
commit
618f51e9dc
459 files changed
+44817
-2191
No files matched your search
+31
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# shellcheck shell=dash
|
||||
# START/STOP/USE_PROCD are consumed by the sourced /etc/rc.common framework.
|
||||
# shellcheck disable=SC2034
|
||||
START=99
|
||||
STOP=10
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
local enabled
|
||||
config_load trafficctl
|
||||
config_get enabled telegram enabled 0
|
||||
[ "$enabled" = "1" ] || return 0
|
||||
|
||||
procd_open_instance telegram
|
||||
procd_set_param command /usr/local/bin/trafficctl-telegram.sh
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_set_param respawn 3600 5 5
|
||||
procd_set_param file /etc/config/trafficctl
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "trafficctl"
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
Reference in new issue
Block a user