Skip to content

Instantly share code, notes, and snippets.

@zunpiau
Last active October 27, 2017 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zunpiau/fdd243c57db7e5df3f41962a87704b6e to your computer and use it in GitHub Desktop.
Save zunpiau/fdd243c57db7e5df3f41962a87704b6e to your computer and use it in GitHub Desktop.
Startup Jetty under Systemd
# /etc/default/jetty
JETTY_HOME=/opt/jetty/jetty-distribution-9.4.8
JETTY_BASE=/var/www/jetty-base
TMPDIR=/var/www/jetty-base/temp
JETTY_PID=/var/www/jetty-base/jetty/jetty.pid
[Unit]
Description=Jetty Web Application Container
After=network.target
[Service]
Type=forking
PIDFile=/var/www/jetty-base/jetty/jetty.pid
User=jetty
Group=jetty
ExecStart=/opt/jetty/jetty-distribution-9.4.8/bin/jetty.sh start
ExecStop=/opt/jetty/jetty-distribution-9.4.8/bin/jetty.sh stop
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment