Created
September 28, 2011 14:26
-
-
Save thefotios/1248075 to your computer and use it in GitHub Desktop.
/etc/init.d/selenium script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Service for selenium (from http://www.thelinuxblog.com/adding-a-service-on-fedora/) | |
# | |
# Author: Fotios Lindiakos (fotios@redhat.com) | |
# | |
# chkconfig: 2345 55 45 | |
# | |
# description: This is the selenium service | |
# processname: selenium | |
# | |
RETVAL=0; | |
start() { | |
echo "Starting selenium" | |
/usr/local/bin/ephemeral-x java -jar /var/lib/selenium/selenium-server.jar -role webdriver -hub http://ec2-107-20-156-96.compute-1.amazonaws.com:4444 -nodeConfig /var/lib/selenium/config.json -log /var/log/selenium.log &> /dev/null & | |
} | |
stop() { | |
echo "Stopping selenium" | |
pkill -f '-role webdriver' | |
} | |
restart() { | |
stop | |
start | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
restart) | |
restart | |
;; | |
*) | |
echo $"Usage: $0 {start|stop|restart}" | |
exit 1 | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment