System notice: In light of the Debian OpenSSL security issue we've regenerated the server keys. See this thread for instructions and the new key fingerprints.

Commit 05e3db0b6b430b2c825a2653bc598ad5e212b8f2

Write a PID file if daemonized

Commit diff

script/git-daemon

 
3333 def start
3434 if @options[:daemonize]
3535 daemonize(@options[:logfile])
36 File.open(@options[:pidfile], "w") do |f|
37 f.write(Process.pid)
38 end
3639 end
3740 @socket = TCPServer.new(@options[:host], @options[:port])
3841 log(Process.pid, "Listening on #{@options[:host]}:#{@options[:port]}...")
163163 :port => 9418,
164164 :host => "0.0.0.0",
165165 :logfile => File.join(RAILS_ROOT, "log", "git-daemon.log"),
166 :pidfile => File.join(RAILS_ROOT, "log", "git-daemon.pid"),
166167 :daemonize => false
167168
168169}
183183 options[:logfile] = o
184184 end
185185
186 opts.on("-l", "--logfile", "PID file to use (if daemonized)") do |o|
187 options[:pidfile] = o
188 end
189
186190 opts.on("-d", "--daemonize", "Daemonize or run in foreground (default)") do |o|
187191 options[:daemonize] = o
188192 end
toggle raw diff