• Jakub Narębski's avatar
    git-instaweb: Check that correct config file exists for (re)start · 5ad6d387
    Jakub Narębski authored
    Currently start/restart does not generate any configuration files for
    spawning a new instance.  This means that
      $ git instaweb --http=<server> --start
    might pick up stale 'httpd.conf' file for a different web server
    (e.g. for default lighttpd when requesting apache2).
    This commit changes that, and makes git-instaweb generate web server
    config file and/or gitweb config file if don't exists.
    This required naming config files after the name of web server
    (alternate solution would be to somehow mark for which web server was
    config file generated).
    Note that web servers that embed configuration in server script file,
    namely webrick and plackup, and which delete "$conf" in their *_conf
    function, would have their config (server script) always regenerated.
    Note: this commit introduces a bit of code repetition (but only a few
    Reported-by: Gurjeet Singh's avatarGurjeet Singh <[email protected]>
    Signed-off-by: Jakub Narębski's avatarJakub Narebski <[email protected]>
    Acked-by: default avatarEric Wong <[email protected]>
git-instaweb.sh 17.8 KB