aboutsummaryrefslogtreecommitdiff
path: root/doc/post-commit.mdwn
blob: ea11ba7c936a3008880255aecde79fbd42e47234 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
If your wiki is kept in [[revision_control|rcs]], a post-commit hook is run
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.

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.

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 in more detail.