Skip to content

Instantly share code, notes, and snippets.

@mylk
Created August 16, 2016 14:17
Show Gist options
  • Save mylk/6fe812863c5a44f7ff8116f48cc22492 to your computer and use it in GitHub Desktop.
Save mylk/6fe812863c5a44f7ff8116f48cc22492 to your computer and use it in GitHub Desktop.
Selenium standalone server systemd script
# /etc/systemd/system/selenium.service
# assumes selenium server and chromedriver exist in the following paths:
# /var/selenium/selenium-server-standalone-2.45.0.jar
# /var/selenium/chromedriver
[Unit]
Description=Selenium Standalone Server
Requires=xvfb.service
After=xvfb.service
[Service]
Type=simple
User=root
Environment=DISPLAY=:99
ExecStart=/usr/bin/java -jar /var/selenium/selenium-server-standalone-2.45.0.jar -Dwebdriver.chrome.driver=/var/selenium/chromedriver > /var/log/selenium.log 2> /var/log/selenium.error.log &
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment