Skip to content

Commit fa5ff7a

Browse files
committed
Remove ubuntu 14.04 and upstart.
1 parent 0bf5e1a commit fa5ff7a

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

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

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -52,40 +52,6 @@ Also, check that the Git binary is indeed located at `/usr/bin/git` and change t
5252

5353
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`.
5454

55-
Up to and including LTS 14.04, Ubuntu used upstart service unit configuration.
56-
Therefore, on Ubuntu 14.04 or earlier, you can use an Upstart script.
57-
So, in the following file
58-
59-
[source,console]
60-
----
61-
/etc/init/local-git-daemon.conf
62-
----
63-
64-
you put this script:
65-
66-
[source,console]
67-
----
68-
start on startup
69-
stop on shutdown
70-
exec /usr/bin/git daemon \
71-
--user=git --group=git \
72-
--reuseaddr \
73-
--base-path=/srv/git/ \
74-
/srv/git/
75-
respawn
76-
----
77-
78-
For security reasons, it is strongly encouraged to have this daemon run as a user with read-only permissions to the repositories -- you can easily do this by creating a new user 'git-ro' and running the daemon as them.
79-
For the sake of simplicity we'll simply run it as the same 'git' user that `git-shell` is running as.
80-
81-
When you restart your machine, your Git daemon will start automatically and respawn if it goes down.
82-
To get it running without having to reboot, you can run this:
83-
84-
[source,console]
85-
----
86-
$ initctl start local-git-daemon
87-
----
88-
8955
On other systems, you may want to use `xinetd`, a script in your `sysvinit` system, or something else -- as long as you get that command daemonized and watched somehow.
9056

9157
Next, you have to tell Git which repositories to allow unauthenticated Git server-based access to.

0 commit comments

Comments
 (0)