Created
November 18, 2016 13:01
-
-
Save danischroeter/0750168294c5b1f3355fa5539c871df5 to your computer and use it in GitHub Desktop.
Teamcity Server / Agent with SystemD in CentOs
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
JAVA_HOME=/usr/java/default | |
JAVA_OPTS="-server -Dfile.encoding=utf-8 -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true -Djava.awt.headless=true" | |
TEAMCITY_AGENT_MEM_OPTS="-Xmx3072m" | |
TEAMCITY_AGENT_OPTS="" | |
# TEAMCITY_LAUNCHER_OPTS Set agent launcher JVM options | |
# TEAMCITY_AGENT_PREPARE_SCRIPT name of a script to execute before start/stop |
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
JAVA_HOME=/usr/java/default | |
JAVA_OPTS="-server -Dfile.encoding=utf-8 -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true -Djava.awt.headless=true" | |
TEAMCITY_DATA_PATH=/opt/teamcity/data | |
TEAMCITY_SERVER_MEM_OPTS="-Xmx2048m" | |
TEAMCITY_SERVER_OPTS="" | |
# TEAMCITY_PREPARE_SCRIPT name of a script to execute before start/stop | |
TEAMCITY_PID_FILE_PATH=/opt/teamcity/run/teamcity.pid |
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
[Unit] | |
Description=TeamCity Build Agent | |
After=network.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=true | |
User=tca | |
EnvironmentFile=/etc/sysconfig/tca | |
ExecStart=/opt/tca/bin/agent.sh start | |
ExecStop=-/opt/tca/bin/agent.sh stop force | |
SuccessExitStatus=0 143 | |
[Install] | |
WantedBy=default.target |
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
[Unit] | |
Description=TeamCity Server | |
After=network.target | |
[Service] | |
Type=forking | |
PIDFile=/opt/teamcity/run/teamcity.pid | |
EnvironmentFile=/etc/sysconfig/teamcity | |
User=teamcity | |
ExecStart=/opt/teamcity/current/bin/teamcity-server.sh start | |
ExecStop=/opt/teamcity/current/bin/teamcity-server.sh stop | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have a hyphen after ExecStop here, is that intentional?