开发者

bash: script doesn't run in the background

I have a scrip开发者_运维百科t that performs several linux commands. When I run "./script.sh &" it works fine until I cancel the console. However, when I login again the scritp seems to be running in background but not doing anything.

What can be the problem?

Thanks


You forgot to use nohup when starting it.


nohup {command} 0 2>/dev/null &

should work for you

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜