public
Description: A quick & dirty git-powered Sinatra wiki
Homepage: http://atonie.org/2008/02/git-wiki
Clone URL: git://github.com/sr/git-wiki.git
Explain how to run git-wiki as a daemon
sr (author)
Sun May 04 04:28:03 -0700 2008
commit  90221a58f2627d81367aacf9bf833f1790daa5f0
tree    71179962af39267dab81d950b36f2cef2660dfee
parent  5108abaf48af3b8d31884bd2573bdf19945c84da
...
25
26
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
29
30
31
32
33
 
...
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
0
@@ -25,9 +25,33 @@ To get them, run the fellowing commands :
0
 Note that git-wiki is released under the terms of the [WTPL][] so really, you
0
 can do what the fuck you want with it.
0
 
0
+Tip: run git-wiki as a daemon
0
+------------------------------
0
+
0
+1. Install the gem [daemons][].
0
+
0
+ `% sudo gem install daemons`
0
+
0
+2. Create a new service (don't forget to modify the path to git-wiki)
0
+<pre><code>% sudo cat > /etc/init.d/git-wiki &lt;&lt;EOF
0
+&#35;!/usr/bin/env ruby
0
+require 'rubygems'
0
+require 'daemons'
0
+Daemons.run('/home/simon/src/git-wiki/git-wiki.rb',
0
+ :dir_mode => :system,
0
+ :log_output => true,
0
+ :mode => :exec
0
+)
0
+EOF</code></pre>
0
+
0
+3. Install it as a boot service. On Ubuntu, run
0
+
0
+ `% sudo /usr/sbin/update-rc.d git-wiki defaults`
0
+
0
 [git]: http://git.or.cz/
0
 [Sinatra]: http://sinatrarb.com
0
 [git-wiki]: http://atonie.org/2008/02/git-wiki
0
 [HAML]: http://haml.hamptoncatlin.com/
0
 [gs]: http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html
0
 [WTPL]: http://sam.zoy.org/wtfpl/
0
+[daemons]: http://daemons.rubyforge.org/

Comments

    No one has commented yet.