meder omuraliev
meder omuraliev

Reputation: 186742

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 it?

Upvotes: 0

Views: 125

Answers (1)

olleolleolle
olleolleolle

Reputation: 1946

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.

Upvotes: 2

Related Questions