HRZ

lunix 程序保持后台运行

调用命令之前加上nohup

//原本的命令
./go-cqhttp
//后台运行的命令
nohup ./go-cqhttp
//提示nohup: ignoring input and appending output to ‘nohup.out’就表示成功了

关闭进程

[root@xxx qqbot-php]# ps -aux | grep go-cqhttp
root     23119  0.0  1.0 719592 18852 ?        Sl   21:12   0:00 ./go-cqhttp
root     23140  0.0  0.0 112712   964 pts/2    S+   21:17   0:00 grep --color=auto go-cqhttp

kill 23119