add --setup, --wrappermode
[ikiwiki.git] / ikiwiki.setup
1 #!/usr/bin/perl
2 # Configuration file for ikiwiki.
3 # Passing this to ikiwiki --setup will make ikiwiki generate tw
4 # wrapper programs, one for cgi and one for a subversion post-commit hook.
5 #
6 # Remember to re-run ikiwiki --setup any time you edit this file.
7
8 my %common=(
9         wikiname => "MyWiki",
10
11         # Be sure to customise these..
12         srcdir => "/path/to/source",
13         templatedir => "/path/to/templates",
14         destdir => "/var/www/wiki",
15         url => "http://myhost/wiki",
16         cgiurl => "http://myhost/ikiwiki.cgi",
17         historyurl => "$webdir/cgi-bin/viewcvs?[[]]"
18         
19         # Whether to integrate with svn.
20         svn => 1,
21         svnrepo => "/svn/wiki",
22         
23         # Can anonymous web users edit pages?
24         #anonok => 1,
25 );      
26
27 gen_wrapper(
28         %common,
29         cgi => 1,
30         wrapper => "$common{destdir}/ikiwiki.cgi",
31         wrappermode => 06755,
32 );
33 gen_wrapper(
34         %common,
35         # Note that this will overwrite any exsting post-commit hoo
36         # script, which may not be what you want.
37         wrapper => "$common{svnrepo}/hooks/post-commit",
38         wrappermode => 04755,
39 ) if $common{$svn};