From cfe36b5723b67494adab6b3787aed572604f6c49 Mon Sep 17 00:00:00 2001 From: Raphael R Date: Tue, 7 Nov 2017 14:19:18 +0100 Subject: [PATCH 1/2] systemd config file uses full path to git binary. Fixes #923 --- book/04-git-server/sections/git-daemon.asc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/book/04-git-server/sections/git-daemon.asc b/book/04-git-server/sections/git-daemon.asc index 8faf40c5d..acd657ed5 100644 --- a/book/04-git-server/sections/git-daemon.asc +++ b/book/04-git-server/sections/git-daemon.asc @@ -30,7 +30,7 @@ Simply place a file in `/etc/systemd/system/git-daemon.service` with these conte Description=Start Git Daemon [Service] -ExecStart=git daemon --reuseaddr --base-path=/srv/git/ /srv/git/ +ExecStart=/usr/bin/git daemon --reuseaddr --base-path=/srv/git/ /srv/git/ Restart=always RestartSec=500ms @@ -50,6 +50,8 @@ You might have noticed that Git daemon is started here with `git` as both group Modify it to fit your needs and make sure provided user exists on the system. +Also, make sure that the Git binary is indeed located at `/usr/bin/git` and change the path if necessary. + 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`. Until LTS 14.04, Ubuntu used upstart service unit configuration. From ce3332b11339c8a8a5794dbe1ddd6bf538c19657 Mon Sep 17 00:00:00 2001 From: Raphael R Date: Sun, 12 Nov 2017 22:42:11 +0100 Subject: [PATCH 2/2] Contracts three paragraphs, one style improvement. As per @ben's suggestion, the three paragraphs dealing with adapting the systemd config to the system at hand have been compounded into one. I also got rid of a double "make sure" for style. --- book/04-git-server/sections/git-daemon.asc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/book/04-git-server/sections/git-daemon.asc b/book/04-git-server/sections/git-daemon.asc index acd657ed5..d8ed8872e 100644 --- a/book/04-git-server/sections/git-daemon.asc +++ b/book/04-git-server/sections/git-daemon.asc @@ -47,10 +47,8 @@ WantedBy=multi-user.target ---- You might have noticed that Git daemon is started here with `git` as both group and user. - -Modify it to fit your needs and make sure provided user exists on the system. - -Also, make sure that the Git binary is indeed located at `/usr/bin/git` and change the path if necessary. +Modify it to fit your needs and make sure the provided user exists on the system. +Also, check that the Git binary is indeed located at `/usr/bin/git` and change the path if necessary. 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`.