Skip to content

Instantly share code, notes, and snippets.

@devseevali
Forked from dkhenry/play2.service
Last active January 17, 2021 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save devseevali/9ec2aeb13df90755b93c9690b65fc2fc to your computer and use it in GitHub Desktop.
Save devseevali/9ec2aeb13df90755b93c9690b65fc2fc to your computer and use it in GitHub Desktop.
Systemd script for the Play Framework
[Unit]
Description=Play2 Server for <site>
After=network.target
 
[Service]
Type=simple
PIDFile=<path>/RUNNING_PID
 
ExecStartPre=[ -e <path>/RUNNING_PID ] && rm <path>/RUNNING_PID
ExecStart=<path>/bin/server
ExecStop=/bin/kill $MAINPID
ExecStopPost=[ -e <path>/RUNNING_PID ] && rm <path>/RUNNING_PID
ExecRestart=/bin/kill $MAINPID
Restart=true
 
[Install]
WantedBy=multi-user.target
@devseevali
Copy link
Author

This systemd script is checked and working on CentOS 7 for GitPitch tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment