ansible-gerrit-management/templates/gerrit.service.j2

18 lines
500 B
Django/Jinja

[Unit]
Description=Gerrit
After=network.target
[Service]
Type=simple
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=gerrit
WorkingDirectory={{ gerrit_home_dir }}
User={{ gerrit_user|default('git') }}
ExecStart={{ gerrit_java_path|default('/usr/bin/java') }} -DGerritCodeReview=1 -jar {{ gerrit_home_dir }}/gerrit-{{ gerrit_version }}.war daemon -d {{ gerrit_site|default('rlgitsvc') }}
ExecStop=/bin/kill -s SIGINT $MAINPID
PIDFile=/run/gerrit.pid
[Install]
WantedBy=multi-user.target