0

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
meder omuraliev
  • 183,342
  • 71
  • 393
  • 434
  • Please see [Process Management](http://mywiki.wooledge.org/ProcessManagement#How_can_I_check_to_see_if_my_game_server_is_still_running.3F__I.27ll_put_a_script_in_crontab.2C_and_if_it.27s_not_running.2C_I.27ll_restart_it...). – Dennis Williamson Jan 19 '11 at 16:09

1 Answers1

2

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.

olleolleolle
  • 1,918
  • 16
  • 20