My Hercules and Turnkey3 headless server startup script

I wanted to have my hercules system start automatically in a 'headless' server environment. Basically I just wanted it to be running after I hit the power on switch without me having to do anything more energetic than hit the switch (or reboot etc). I was getting a bit tired of having to start for TK3 hercules, then the telnet session and the two 3270 sessions and manually ipl every time I rebooted.

Well I managed to get it to work, but it wasn't at all easy. But it works ok now. Posted here in case anyone else is interested. It is designed to run as an init.d script at startup and shutdown, and has the script headers to allow chkconfig add|on for fedora systems.

After the script runs as part of the normal server reboot

At server shutdown

Because I managed to get the master console into a screen session, we can cleanly shutdown.

The script itself

I suppose if you have paged down this far you might actually want the script. The script is here. Feel free to improve on it as you see fit.