bash

Bourne again shell.

Server loop

   1 #!/bin/sh
   2 # restart the server in case of failure
   3 logger "Starting server.py"
   4 until /usr/bin/python server.py 1234; do
   5     logger "Server crashed with exit code $?.  Respawning.."
   6     sleep 1
   7 done

Add extra IP address to NIC

Adapted from http://unclean.org/howto/secondip.html

Add extra IP 192.168.1.5 to NIC eth0

   1 ifconfig eth0:0 192.168.1.5
   2 route add -host 192.168.1.5 dev eth0:0

bash (last edited 2014-02-26 19:30:06 by bl7-65-145)