2007-08-22 04:45:44 +02:00
|
|
|
If your wiki is kept in [[revision_control|rcs]], a post-commit hook is run
|
2007-08-21 06:25:03 +02:00
|
|
|
every time you commit a change to your repository. To make the wiki be
|
|
|
|
updated each time a commit is made, it can be run from (or as) a
|
|
|
|
post-commit hook.
|
2006-03-11 06:34:08 +01:00
|
|
|
|
2006-06-02 07:32:20 +02:00
|
|
|
The best way to run ikiwiki in a post-commit hook is using a wrapper, which
|
|
|
|
ikiwiki is usually configured to generate using a setup file.
|
2006-03-10 10:16:07 +01:00
|
|
|
|
|
|
|
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
|
2006-03-11 01:40:34 +01:00
|
|
|
specified when you ran --wrapper, and can only be used to update and
|
2006-03-10 10:16:07 +01:00
|
|
|
compile that one checkout into the specified html directory.
|
|
|
|
|
2006-06-02 07:32:20 +02:00
|
|
|
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
|
2006-03-10 10:16:07 +01:00
|
|
|
your wiki checkout and html directory. If so, you can safely make
|
2006-06-02 07:32:20 +02:00
|
|
|
the wrapper suid to a user who can write there (*not* to root!). You might
|
2006-03-10 10:16:07 +01:00
|
|
|
want to read [[Security]] first.
|
2006-03-13 20:29:21 +01:00
|
|
|
|
2006-08-07 05:39:59 +02:00
|
|
|
[[Setup]] explains setting this up in more detail.
|