How can I write a shell script that goes into a screen and invokes something?
My IRC bot sporadically dies sometimes and I have it in a screen. The way to invoke it again is node protobot.js
.
I have to always find that screen and reinvoke it. I'd like a faster way.
How can I invoke screen reliably from within a shell script in order to invoke node to revive i开发者_运维百科t?
Your process needs care and feeding? Do not put it in the screen to begin with.
Investigate process monitoring, for instance with Monit, or God, or some other keep-it-alive software. There are tons of alternatives. When you've seen these two, the Net should provide you with pros and cons and other names of software.
精彩评论