Thursday, April 28, 2011

Running git-instaweb on boot

When i run this (using the update-rc method) on boot, it shows a browser (w3m) pointing to the page and boot halts until I quit the browser. Is there a way to run it silently on boot? I looked at the manpage and it says nothing, so probably it's not supposed to work that way... Am I doing something wrong?

From stackoverflow
  • Adding --start works as expected, but I'm still not sure if this is the right way to solve it.

    Jorge Israel Peña : You can edit your question to add this instead of having to post an answer to your own question simply to add another detail. Not nit picking, just letting you know for future cases.
    Doppelganger : I knew I can edit, but I wasn't sure about the usual way to go when you find your own answer. Now I know, so thanks :)
  • Use:

    git-instaweb -b /bin/true
    

    See the manual page for more options.

    Doppelganger : How does that work ? /bin/true is not mentioned on the manual...
    Tim Henigan : The `-b` option selects the browser to be opened once `instaweb` is running. By setting this to `/bin/true`, it forces the process to exit without further complaint/notification since `/bin/true` always returns immediately with a status code indicating success. See http://ss64.com/bash/true.html for futher info.
  • It sounds like you are using the wrong tool for the job.

    git-instaweb is designed for quick one-off browsing.

    Try gitweb instead which is designed to be run as a service.

  • git-instaweb sets up gitweb into {project folder}/.git/gitweb folder, so you could simply call the web server with the config file generated inside that folder.

0 comments:

Post a Comment