Skip to content

Commit cfe36b5

Browse files
authored
systemd config file uses full path to git binary.
Fixes #923
1 parent eec6e0d commit cfe36b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

book/04-git-server/sections/git-daemon.asc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Simply place a file in `/etc/systemd/system/git-daemon.service` with these conte
3030
Description=Start Git Daemon
3131
3232
[Service]
33-
ExecStart=git daemon --reuseaddr --base-path=/srv/git/ /srv/git/
33+
ExecStart=/usr/bin/git daemon --reuseaddr --base-path=/srv/git/ /srv/git/
3434
3535
Restart=always
3636
RestartSec=500ms
@@ -50,6 +50,8 @@ You might have noticed that Git daemon is started here with `git` as both group
5050

5151
Modify it to fit your needs and make sure provided user exists on the system.
5252

53+
Also, make sure that the Git binary is indeed located at `/usr/bin/git` and change the path if necessary.
54+
5355
Finally, you'll run `systemctl enable git-daemon` to automatically start the service on boot, and can start and stop the service with, respectively, `systemctl start git-daemon` and `systemctl stop git-daemon`.
5456

5557
Until LTS 14.04, Ubuntu used upstart service unit configuration.

0 commit comments

Comments
 (0)