~重写保守模式启动函数,现在启动停止不会有额外kill命令报错,并且增加了对tg_bot脚本的启动支持
~新增tg_bot脚本的定时任务守护进程功能 ~新增公网防火墙禁用时的警告确认功能 ~优化小米路由自启脚本,现在自启脚本单独存放为/data/shellcrash_init.sh,且在卸载脚本时会保留改脚本并保留软固化功能 ~优化小米自动清理功能,适配更多设备 ~修复本地自解压安装时脚本报错bug ~修复小米等设备无法使用tg_bot控制机器人的问题
This commit is contained in:
14
scripts/starts/start_legacy.sh
Normal file
14
scripts/starts/start_legacy.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
. "$CRASHDIR"/libs/check_cmd.sh
|
||||
|
||||
start_legacy(){
|
||||
if ckcmd su && grep -q 'shellcrash:x:0:7890' /etc/passwd; then
|
||||
su shellcrash -c "$1 >/dev/null 2>&1 & echo \$! > /tmp/ShellCrash/$2.pid"
|
||||
elif ckcmd nohup; then
|
||||
nohup $1 >/dev/null 2>&1 &
|
||||
echo $! > "/tmp/ShellCrash/$2.pid"
|
||||
else
|
||||
$1 >/dev/null 2>&1 &
|
||||
echo $! > "/tmp/ShellCrash/$2.pid"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user