X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/65e3686ead9e443584e2c727eec4ccf32bfad47e..c47839389abb8e21a94606a2c105e5c1ecf6ed32:/doc/post-commit.mdwn?ds=inline diff --git a/doc/post-commit.mdwn b/doc/post-commit.mdwn index 6635d3bbd..1c5176d42 100644 --- a/doc/post-commit.mdwn +++ b/doc/post-commit.mdwn @@ -1,11 +1,19 @@ -Here's an example of how to run ikiwiki in a [[Subversion]] post-commit -hook to automatically update a wiki as commits come in: +If your wiki is kept in [[revision_control|rcs]], a post-commit hook is run +every time you commit a change to your repository. - wiki_src=/path/to/checkout - wiki_dest=/path/to/web/server - svn up -q $wiki_src - ikiwiki $wiki_src $wiki_dest --wikiname=MyWiki +ikiwiki generates the "post-commit hook" once you've uncommented the relevant +section (under wrappers) in the ikiwiki.setup. -This assumes that permissions allow anyone who commits to svn up the -wiki_src directory and write to wiki_dest. If they don't, you'll need a -suid wrapper to run the above as a user who can write to both. +The generated wrapper is a C program that is designed to safely be made +suid if necessary. It's hardcoded to run ikiwiki with the settings +specified when you ran --wrapper, and can only be used to update and +compile that one checkout into the specified html directory. + +Depending on your setup, the post-commit hook might end up +getting called by users who have write access to the repository, but not to +your wiki checkout and html directory. If so, you can safely make +the wrapper suid to a user who can write there (*not* to root!). You might +want to read [[Security]] first. + +[[Setup]] explains setting this up from the start and see [[rcs/details]] to +know more.