mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-11 07:51:45 +00:00
~优化nftables启动流程,优化启用cn绕过时的运行效率和数据显示 ~修复tg机器人守护进程没有生效的bug ~修复tg机器人总是绑定失败的bug ~修复9-8功能找不到文件的bug ~修复停止服务时的报错 ~修复启动时自动下载缺失数据库时的意外报错 ~修复nftables启用了本机代理后局域网代理出错的bug
18 lines
456 B
Bash
18 lines
456 B
Bash
|
|
. "$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 setsid; then
|
|
setsid $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
|
|
}
|