My RUNserver files:
- load environment
- move old/previous errorlog file out of the way (eg, rename and gzip)
- touch new errorlog file
- start error log monitoring script (place in background with trailing '&')
- start dataserver (or repserver) (place in background with trailing '&')
- wait XX seconds and kick off post_startup_processing shell script (eg, create tempdb thresholds); where XX is adjusted based on typical dataserver/repserver startup time and then tripled [in line with Bret's comments, my post startup processing isn't time sensitive so a rough swag at the value of XX is sufficient; certainly a looping process checking for db availability would also work, ymmv]