mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-29 17:45:13 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
0d155c70be
commit
32600acc60
14258 files changed
+3954570
No files matched your search
@@ -0,0 +1,6 @@
|
||||
config telegram_bot 'config'
|
||||
option bot_token ''
|
||||
option chat_id ''
|
||||
option polling_time '1'
|
||||
option timeout '30'
|
||||
option plugins '/usr/lib/telegrambot/plugins'
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (c) 2011-2015 OpenWrt.org
|
||||
|
||||
START=99
|
||||
|
||||
start() {
|
||||
if [ ! -f "/var/run/telegrambot.pid" ]; then
|
||||
echo "1" > /var/run/telegrambot.pid
|
||||
/usr/lib/telegrambot/telegrambot >/dev/null 2>&1 &
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
stop() {
|
||||
rm -f /var/run/telegrambot.pid
|
||||
kill $(pgrep -f telegrambot/telegrambot) >/dev/null 2>&1
|
||||
}
|
||||
|
||||
restart(){
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
boot() {
|
||||
(sleep 5 && start >/dev/null 2>&1) &
|
||||
return 0
|
||||
}
|
||||
Reference in new issue
Block a user