amuck-landowner

screen startup script

splitice

Just a little bit crazy...
Verified Provider
Does anyone have a nice template for building an init.d startup script for staring a daemon (including arguments) that runs in a detached screen instance (which can be inspected at a later date).

I've been meaning to develop one myself but have not had the time.

Requirements:

  • start / stop / restart / reload support (in a clean way that closes the screen session on stop)
  • in case of application termination, the screen session continues (a bash shell is acceptable)
  • screen must be detached after boot
  • PID of the inner daemon (i.e not screen) should be stored for use by start-stop-daemon style reloading (via SIGHUP)
  • session should be named based on the daemon name
I could implement these requirements on a base script if anyone has one they would like to contribute.
 
Top
amuck-landowner