Last active
April 24, 2018 16:19
-
-
Save nicopaez/a2d336d6c876f728a6189cde50e8a81f to your computer and use it in GitHub Desktop.
This file contains 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
# /etc/systemd/system/javawebapp.service | |
[Unit] | |
Description=Job that runs the JavaWebApp | |
After=syslog.target | |
[Service] | |
WorkingDirectory=/opt/javawebapp | |
ExecStart=/usr/bin/java -Djava.security.egd=file:/dev/./urandom -Dserver.port=9000 -jar javawebapp.war --spring.profiles.active=prod & | |
ExecStop=/bin/kill -TERM $MAINPID | |
SuccessExitStatus=143 | |
Restart=on-failure | |
RestartSec=5 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment