The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Robin Hood: Survive network restarts

Contributed by: Adam Brinton
This tip is valid for: Both BeOS and Haiku

The popular Web server Robin Hood‘s rhdaemon has trouble staying in the LISTEN state if you restart networking or if you are on a DHCP network and have rhdaemon launch automatically upon startup somehow.

Add the following lines to the end of /boot/beos/system/boot/Netscript :

kill rhdaemon
sleep 7
start home/config/bin/rhdaemon -E

(of course you’ll want to substitute the actual path to rhdaemon on your system).

This launches rhdaemon after the net_server has settled down. If sleeping for 7 seconds before launching rhdaemon does not work then increase that value. Now your web server will not die each time you restart networking!

Posted in Applications

(comments are closed).