selenium_status() {
curl http://localhost:4444/wd/hub/status >/dev/null 2>/dev/null
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo "Selenium server is running."
else
echo "Selenium server is stopped.";
fi
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
stop
start
;;
'status')
selenium_status
;;
esac
Add it to autoload, and start: chmod +x /etc/init.d/selenium chkconfig selenium on service selenium start
Add a list of all hosts to /etc/hosts: 127.0.0.1 t211.wellnessliving.local
127.0.0.1 t212.wellnessliving.local
127.0.0.1 t221.wellnessliving.local
127.0.0.1 t222.wellnessliving.local
127.0.0.1 t231.wellnessliving.local
127.0.0.1 t232.wellnessliving.local