-
-
Save alchi/dd657311ca83fb3110ae to your computer and use it in GitHub Desktop.
Systemd script for the Play Framework
This file contains hidden or 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
| [Unit] | |
| Description=Play2 Server for <site> | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| PIDFile=<app_path>/RUNNING_PID | |
| ExecStartPre=/bin/sh -c 'cd <app_path> ;/bin/rm -f RUNNING_PID' | |
| ExecStart=<app_path>/bin/appexec -J-Xms64M -J-Xmx256M -Dhttp.port=9000 -Duser.timezone=Europe/Copenhagen | |
| ExecStop=/bin/kill $MAINPID | |
| ExecStopPost=/bin/rm -f <app_path>/RUNNING_PID | |
| Restart=always | |
| [Install] | |
| WantedBy=multi-user.target |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ExecRestart removed....
Restart value changed from
truetoalways-fadded to rm, so the service does not fail if RUNNING_PID does not existEverything according to systemd config page...