mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-10 23:41:22 +00:00
20 lines
529 B
Bash
20 lines
529 B
Bash
|
|
. "$CRASHDIR"/libs/set_cron.sh
|
|
|
|
bot_tg_start(){
|
|
bot_tg_stop
|
|
. "$CRASHDIR"/starts/start_legacy.sh
|
|
start_legacy "$CRASHDIR/menus/bot_tg.sh" 'bot_tg'
|
|
bot_tg_cron
|
|
}
|
|
bot_tg_stop(){
|
|
cronset 'TG_BOT守护进程'
|
|
[ -f "$TMPDIR/bot_tg.pid" ] && kill -TERM "$(cat "$TMPDIR/bot_tg.pid")" 2>/dev/null
|
|
killall bot_tg.sh 2>/dev/null
|
|
rm -f "$TMPDIR/bot_tg.pid"
|
|
}
|
|
bot_tg_cron(){
|
|
cronset 'TG_BOT守护进程'
|
|
cronset 'TG_BOT守护进程' "* * * * * /bin/sh $CRASHDIR/starts/start_legacy_wd.sh bot_tg #ShellCrash-TG_BOT守护进程"
|
|
}
|