Skip to content

Instantly share code, notes, and snippets.

@willycedric
Forked from mylk/selenium.service
Created November 18, 2020 16:21
Show Gist options
  • Save willycedric/09bf7f2e792bb5ccc781b71dbcce71ae to your computer and use it in GitHub Desktop.
Save willycedric/09bf7f2e792bb5ccc781b71dbcce71ae 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