optional template
[ikiwiki.git] / doc / wrapperparamstrick.mdwn
1 ikiwiki --wrapper can be used to generate a wrapper
2 program that runs ikiwiki with the specified parameters. This is used for
3 [[post-commit]] hooks, [[CGI]], etc, both for convenience and because these
4 things often need suid wrapper scripts to make ikiwiki run as the right
5 user.
6
7 The generated wrapper is a binary program. What if you want to regenerate
8 it with different parameters, or just run ikiwiki like it would but with
9 some parameter changed? To easily accomomplish this, the wrappers all
10 support being run with --params, which causes them to print out the
11 parameters they run ikiwiki with. 
12
13 You can use this trick to regenerate a wrapper, adding or changing a
14 parameter:
15
16         ikiwiki $(./ikiwiki-wrap --params) --wikiname="newname" --wrapper
17
18 Or just to run ikiwiki like the wrapper would, and add a parameter:
19
20         ikiwiki $(./ikiwiki-wrap --params) --rebuild