Use systemd service for git repository.

This commit is contained in:
Andreas B. Mundt 2019-05-24 19:58:20 +03:00
parent d7a1a146dd
commit e51f6c5e2d
3 changed files with 25 additions and 23 deletions

View file

@ -1,12 +1,18 @@
# Access to git repository.
service git
{
disable = no
type = UNLISTED
port = 9418
socket_type = stream
wait = no
user = nobody
server = /usr/bin/git
server_args = daemon --inetd --export-all --base-path={{ repo_dir }}
}
[Unit]
Description=Start Git Daemon
[Service]
ExecStart=/usr/bin/git daemon --reuseaddr --export-all --base-path={{ repo_dir }}
Restart=always
RestartSec=500ms
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=git-daemon
User=nobody
Group=nogroup
[Install]
WantedBy=multi-user.target