|
Alain Reguera Delgado |
46de3c |
#!/bin/bash
|
|
Alain Reguera Delgado |
46de3c |
# moinmoin-postinstall.sh
|
|
Alain Reguera Delgado |
46de3c |
# MoinMoin 1.5 instance installation script.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# The CentOS Artwork SIG.
|
|
Alain Reguera Delgado |
46de3c |
# http://projects.centos.org/trac/artwork/
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# ---------------------------------------------------------
|
|
Alain Reguera Delgado |
46de3c |
# Begin Configuration Section
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Name of the Wiki Front Page.
|
|
Alain Reguera Delgado |
46de3c |
WIKIFRONTPAGE="FrontPage"
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Directory name where the wiki instance will be copied.
|
|
Alain Reguera Delgado |
46de3c |
WIKILOCATION=/var/www/
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Instance Name. This is the name used to create the directory under
|
|
Alain Reguera Delgado |
46de3c |
# $WIKILOCATION and some others internal links.
|
|
Alain Reguera Delgado |
46de3c |
printf "Instance Name [wiki] : "
|
|
Alain Reguera Delgado |
46de3c |
read WIKIINSTANCE
|
|
Alain Reguera Delgado |
46de3c |
if [ ! $WIKIINSTANCE ];then
|
|
Alain Reguera Delgado |
46de3c |
WIKIINSTANCE='wiki'
|
|
Alain Reguera Delgado |
46de3c |
fi
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Instance name should be uniq.
|
|
Alain Reguera Delgado |
46de3c |
if [ -d ${WIKILOCATION}/$WIKIINSTANCE ];then
|
|
Alain Reguera Delgado |
46de3c |
echo "The instance '$WIKIINSTANCE' already exists."
|
|
Alain Reguera Delgado |
46de3c |
exit;
|
|
Alain Reguera Delgado |
46de3c |
fi
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Site Name. This is the name shown in the browser title bar.
|
|
Alain Reguera Delgado |
46de3c |
printf "Site Name [My Wiki] : "
|
|
Alain Reguera Delgado |
46de3c |
read WIKISITENAME
|
|
Alain Reguera Delgado |
46de3c |
if [ ! $WIKINAME ];then
|
|
Alain Reguera Delgado |
46de3c |
WIKINAME='My Wiki'
|
|
Alain Reguera Delgado |
46de3c |
fi
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Alias Name used to access the wiki. By default we access
|
|
Alain Reguera Delgado |
46de3c |
# the wiki with the form: `http://localhost/wiki'. If you
|
|
Alain Reguera Delgado |
46de3c |
# want to acces the wiki with other alias name then change
|
|
Alain Reguera Delgado |
46de3c |
# this value and fill it with the name you want to access
|
|
Alain Reguera Delgado |
46de3c |
# your wiki.
|
|
Alain Reguera Delgado |
46de3c |
WIKIALIAS=$WIKIINSTANCE
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Alias name used to access wiki static files. This value
|
|
Alain Reguera Delgado |
46de3c |
# should be different from $WIKIALIAS above.
|
|
Alain Reguera Delgado |
46de3c |
WIKIURLPREFIX=${WIKIINSTANCE}_staticfiles
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Wiki Super User. Add your WikiUserName here.
|
|
Alain Reguera Delgado |
46de3c |
printf "Site superuser [YourName] : "
|
|
Alain Reguera Delgado |
46de3c |
read WIKISUPERUSER
|
|
Alain Reguera Delgado |
46de3c |
if [ ! $WIKISUPERUSER ];then
|
|
Alain Reguera Delgado |
46de3c |
WIKISUPERUSER='YourName'
|
|
Alain Reguera Delgado |
46de3c |
fi
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Do you want to restrict the edit actions ? (yes|no).
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# a) If `yes' only the wiki superuser, and those listed into
|
|
Alain Reguera Delgado |
46de3c |
# EditGroup and AdminGroup pages will be able to edit pages
|
|
Alain Reguera Delgado |
46de3c |
# on your wiki. After this script is run, we suggest to:
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# 1. Register the superuser. For example:
|
|
Alain Reguera Delgado |
46de3c |
# Login > UserPreferences > Create Profile
|
|
Alain Reguera Delgado |
46de3c |
# 2. Create a EditGroup page.
|
|
Alain Reguera Delgado |
46de3c |
# 3. Add registered user names into EditGroup page.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# At this point those users listed in EditGroup will
|
|
Alain Reguera Delgado |
46de3c |
# be able to edit pages on your wiki. If you need to
|
|
Alain Reguera Delgado |
46de3c |
# grant admin rights to other people then create the
|
|
Alain Reguera Delgado |
46de3c |
# AdminGroup page and add register users names into
|
|
Alain Reguera Delgado |
46de3c |
# it. After that they will have admin rights.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# More info about acl can be found at
|
|
Alain Reguera Delgado |
46de3c |
# http://localhost/wiki/HelpOnAccessControlLists once
|
|
Alain Reguera Delgado |
46de3c |
# you have installed the wiki.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# b) If `no' all users will be able to edit your wiki. Even
|
|
Alain Reguera Delgado |
46de3c |
# if they haven't a user register on it.
|
|
Alain Reguera Delgado |
46de3c |
WIKIRESTRICTEDIT="no"
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Mail
|
|
Alain Reguera Delgado |
46de3c |
WIKIMAILSMARTHOST=""
|
|
Alain Reguera Delgado |
46de3c |
WIKIMAILFROM=""
|
|
Alain Reguera Delgado |
46de3c |
WIKIMAILLOGIN=""
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Language.
|
|
Alain Reguera Delgado |
46de3c |
WIKILANGUAGE="en"
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Basic installation Prefix.
|
|
Alain Reguera Delgado |
46de3c |
PREFIX=/usr
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Share directory name.
|
|
Alain Reguera Delgado |
46de3c |
SHARE=$PREFIX/share/moin/
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# User & Group used by your web server.
|
|
Alain Reguera Delgado |
46de3c |
USER=apache
|
|
Alain Reguera Delgado |
46de3c |
GROUP=$USER
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# End of Configuration section
|
|
Alain Reguera Delgado |
46de3c |
# ---------------------------------------------------------
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Copy files
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# Here we create directories and copy files into the
|
|
Alain Reguera Delgado |
46de3c |
# instance.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
echo "Creating instance ..."
|
|
Alain Reguera Delgado |
46de3c |
cd $WIKILOCATION
|
|
Alain Reguera Delgado |
46de3c |
mkdir $WIKIINSTANCE
|
|
Alain Reguera Delgado |
46de3c |
cp -R ${SHARE}data $WIKIINSTANCE
|
|
Alain Reguera Delgado |
46de3c |
cp -R ${SHARE}htdocs $WIKIINSTANCE
|
|
Alain Reguera Delgado |
46de3c |
cp -R ${SHARE}underlay $WIKIINSTANCE
|
|
Alain Reguera Delgado |
46de3c |
mkdir ${WIKIINSTANCE}/cgi-bin
|
|
Alain Reguera Delgado |
46de3c |
cp ${SHARE}server/moin.cgi ${WIKIINSTANCE}/cgi-bin
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Fix PATH in moin.cgi file
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
sed -i -e "
|
|
Alain Reguera Delgado |
46de3c |
s/\/path\/to\/wikiconfig/\/var\/www\/${WIKIINSTANCE}\/cgi-bin/
|
|
Alain Reguera Delgado |
46de3c |
s/\/path\/to\/farmconfig/\/var\/www\/${WIKIINSTANCE}\/cgi-bin\/farmconfig/
|
|
Alain Reguera Delgado |
46de3c |
" ${WIKILOCATION}${WIKIINSTANCE}/cgi-bin/moin.cgi
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Apache Configuration
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# Here we create the apache configuration file. By default
|
|
Alain Reguera Delgado |
46de3c |
# the wiki will be accessed through the `wiki' apache alias.
|
|
Alain Reguera Delgado |
46de3c |
# Virtual domains are also included but commented by
|
|
Alain Reguera Delgado |
46de3c |
# default.
|
|
Alain Reguera Delgado |
46de3c |
cat <<APACHECONF > /etc/httpd/conf.d/${WIKIINSTANCE}.conf
|
|
Alain Reguera Delgado |
46de3c |
# Apache web server configuration for MoinMoin wiki.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# Created by create-wiki-instance.sh.
|
|
Alain Reguera Delgado |
46de3c |
# `echo date`
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# By Alias.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
Alias /${WIKIURLPREFIX} "${WIKILOCATION}${WIKIINSTANCE}/htdocs/"
|
|
Alain Reguera Delgado |
46de3c |
<Directory "${WIKILOCATION}${WIKIINSTANCE}/htdocs/">
|
|
Alain Reguera Delgado |
46de3c |
Order deny,allow
|
|
Alain Reguera Delgado |
46de3c |
Allow from all
|
|
Alain Reguera Delgado |
46de3c |
</Directory>
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
ScriptAlias /${WIKIINSTANCE} "${WIKILOCATION}${WIKIINSTANCE}/cgi-bin/moin.cgi"
|
|
Alain Reguera Delgado |
46de3c |
<Directory "${WIKILOCATION}${WIKIINSTANCE}/cgi-bin">
|
|
Alain Reguera Delgado |
46de3c |
Order deny,allow
|
|
Alain Reguera Delgado |
46de3c |
Allow from all
|
|
Alain Reguera Delgado |
46de3c |
</Directory>
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# By Virtual Domains.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
#<VirtualHost *:80>
|
|
Alain Reguera Delgado |
46de3c |
# ServerName wiki.example.tld
|
|
Alain Reguera Delgado |
46de3c |
# ServerAdmin webmaster@example.tld
|
|
Alain Reguera Delgado |
46de3c |
# ErrorLog logs/wiki.example.tld-error_log
|
|
Alain Reguera Delgado |
46de3c |
# CustomLog logs/wiki.example.tld-access_log common
|
|
Alain Reguera Delgado |
46de3c |
# Alias /${WIKIURLPREFIX} "${WIKILOCATION}${WIKIINSTANCE}/htdocs/"
|
|
Alain Reguera Delgado |
46de3c |
# Alias /favicon.ico "${WIKILOCATION}${WIKIINSTANCE}/favicon.ico"
|
|
Alain Reguera Delgado |
46de3c |
# ScriptAlias / "${WIKILOCATION}${WIKIINSTANCE}/cgi-bin/moin.cgi/"
|
|
Alain Reguera Delgado |
46de3c |
#</VirtualHost>
|
|
Alain Reguera Delgado |
46de3c |
APACHECONF
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# MoinMoin Configuration - wikiconfig.py
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# Here is a copy and paste from original wikiconfig.py file
|
|
Alain Reguera Delgado |
46de3c |
# in the moin-1.5.7-1.el5.rf package. Some additions were
|
|
Alain Reguera Delgado |
46de3c |
# included in the secutiry section to make it configurablen
|
|
Alain Reguera Delgado |
46de3c |
# between 1) an everyone editable wiki 2) a just Superuser,
|
|
Alain Reguera Delgado |
46de3c |
# EditGroup, and AdminGroup editable wiki.
|
|
Alain Reguera Delgado |
46de3c |
cat <<WIKICONFIG > ${WIKIINSTANCE}/cgi-bin/wikiconfig.py
|
|
Alain Reguera Delgado |
46de3c |
# -*- coding: iso-8859-1 -*-
|
|
Alain Reguera Delgado |
46de3c |
# IMPORTANT! This encoding (charset) setting MUST be correct! If you live in a
|
|
Alain Reguera Delgado |
46de3c |
# western country and you don't know that you use utf-8, you probably want to
|
|
Alain Reguera Delgado |
46de3c |
# use iso-8859-1 (or some other iso charset). If you use utf-8 (a Unicode
|
|
Alain Reguera Delgado |
46de3c |
# encoding) you MUST use: coding: utf-8
|
|
Alain Reguera Delgado |
46de3c |
# That setting must match the encoding your editor uses when you modify the
|
|
Alain Reguera Delgado |
46de3c |
# settings below. If it does not, special non-ASCII chars will be wrong.
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
"""
|
|
Alain Reguera Delgado |
46de3c |
MoinMoin - Configuration for a single wiki
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
If you run a single wiki only, you can omit the farmconfig.py config
|
|
Alain Reguera Delgado |
46de3c |
file and just use wikiconfig.py - it will be used for every request
|
|
Alain Reguera Delgado |
46de3c |
we get in that case.
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
Note that there are more config options than you'll find in
|
|
Alain Reguera Delgado |
46de3c |
the version of this file that is installed by default; see
|
|
Alain Reguera Delgado |
46de3c |
the module MoinMoin.multiconfig for a full list of names and their
|
|
Alain Reguera Delgado |
46de3c |
default values.
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
Also, the URL http://moinmoin.wikiwikiweb.de/HelpOnConfiguration has
|
|
Alain Reguera Delgado |
46de3c |
a list of config options.
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
** Please do not use this file for a wiki farm. Use the sample file
|
|
Alain Reguera Delgado |
46de3c |
from the wikifarm directory instead! **
|
|
Alain Reguera Delgado |
46de3c |
"""
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
from MoinMoin.multiconfig import DefaultConfig
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
class Config(DefaultConfig):
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Wiki identity ----------------------------------------------------
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Site name, used by default for wiki name-logo [Unicode]
|
|
Alain Reguera Delgado |
46de3c |
sitename = u'${WIKISITENAME}'
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Wiki logo. You can use an image, text or both. [Unicode]
|
|
Alain Reguera Delgado |
46de3c |
# For no logo or text, use '' - the default is to show the sitename.
|
|
Alain Reguera Delgado |
46de3c |
# See also url_prefix setting below!
|
|
Alain Reguera Delgado |
46de3c |
logo_string = u''
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# name of entry page / front page [Unicode], choose one of those:
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# a) if most wiki content is in a single language
|
|
Alain Reguera Delgado |
46de3c |
#page_front_page = u"MyStartingPage"
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# b) if wiki content is maintained in many languages
|
|
Alain Reguera Delgado |
46de3c |
page_front_page = u"${WIKIFRONTPAGE}"
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# The interwiki name used in interwiki links
|
|
Alain Reguera Delgado |
46de3c |
#interwikiname = 'UntitledWiki'
|
|
Alain Reguera Delgado |
46de3c |
# Show the interwiki name (and link it to page_front_page) in the Theme,
|
|
Alain Reguera Delgado |
46de3c |
# nice for farm setups or when your logo does not show the wiki's name.
|
|
Alain Reguera Delgado |
46de3c |
#show_interwiki = 1
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Critical setup ---------------------------------------------------
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Misconfiguration here will render your wiki unusable. Check that
|
|
Alain Reguera Delgado |
46de3c |
# all directories are accessible by the web server or moin server.
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# If you encounter problems, try to set data_dir and data_underlay_dir
|
|
Alain Reguera Delgado |
46de3c |
# to absolute paths.
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Where your mutable wiki pages are. You want to make regular
|
|
Alain Reguera Delgado |
46de3c |
# backups of this directory.
|
|
Alain Reguera Delgado |
46de3c |
data_dir = '${WIKILOCATION}${WIKIINSTANCE}/data/'
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Where read-only system and help page are. You might want to share
|
|
Alain Reguera Delgado |
46de3c |
# this directory between several wikis. When you update MoinMoin,
|
|
Alain Reguera Delgado |
46de3c |
# you can safely replace the underlay directory with a new one. This
|
|
Alain Reguera Delgado |
46de3c |
# directory is part of MoinMoin distribution, you don't have to
|
|
Alain Reguera Delgado |
46de3c |
# backup it.
|
|
Alain Reguera Delgado |
46de3c |
data_underlay_dir = '${WIKILOCATION}${WIKIINSTANCE}/underlay/'
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Location of your STATIC files (css/png/js/...) - you must NOT use the
|
|
Alain Reguera Delgado |
46de3c |
# same for invoking moin.cgi (or, in general, the moin code).
|
|
Alain Reguera Delgado |
46de3c |
# url_prefix must be '/wiki' for Twisted and standalone servers.
|
|
Alain Reguera Delgado |
46de3c |
# For CGI, it should match your Apache Alias setting.
|
|
Alain Reguera Delgado |
46de3c |
url_prefix = '/${WIKIURLPREFIX}'
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Security ----------------------------------------------------------
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# This is checked by some rather critical and potentially harmful actions,
|
|
Alain Reguera Delgado |
46de3c |
# like despam or PackageInstaller action:
|
|
Alain Reguera Delgado |
46de3c |
#superuser = [u"${WIKISUPERUSER}", ]
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# IMPORTANT: grant yourself admin rights! replace YourName with
|
|
Alain Reguera Delgado |
46de3c |
# your user name. See HelpOnAccessControlLists for more help.
|
|
Alain Reguera Delgado |
46de3c |
# All acl_rights_xxx options must use unicode [Unicode]
|
|
Alain Reguera Delgado |
46de3c |
#acl_rights_default = u"All:read"
|
|
Alain Reguera Delgado |
46de3c |
#acl_rights_before = u"${WIKISUPERUSER}:read,write,delete,revert,admin" \\
|
|
Alain Reguera Delgado |
46de3c |
# u"AdminGroup:read,write,delete,revert,admin" \\
|
|
Alain Reguera Delgado |
46de3c |
# u"EditGroup:read,write,delete,revert"
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Link spam protection for public wikis (Uncomment to enable)
|
|
Alain Reguera Delgado |
46de3c |
# Needs a reliable internet connection.
|
|
Alain Reguera Delgado |
46de3c |
#from MoinMoin.util.antispam import SecurityPolicy
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Mail --------------------------------------------------------------
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Configure to enable subscribing to pages (disabled by default)
|
|
Alain Reguera Delgado |
46de3c |
# or sending forgotten passwords.
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# SMTP server, e.g. "mail.provider.com" (None to disable mail)
|
|
Alain Reguera Delgado |
46de3c |
#mail_smarthost = "${WIKIMAILSMARTHOST}"
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# The return address, e.g u"Jürgen Wiki <noreply@mywiki.org>" [Unicode]
|
|
Alain Reguera Delgado |
46de3c |
#mail_from = u"${WIKIMAILFROM}"
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# "user pwd" if you need to use SMTP AUTH
|
|
Alain Reguera Delgado |
46de3c |
#mail_login = "${WIKIMAILLOGIN}"
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# User interface ----------------------------------------------------
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Add your wikis important pages at the end. It is not recommended to
|
|
Alain Reguera Delgado |
46de3c |
# remove the default links. Leave room for user links - don't use
|
|
Alain Reguera Delgado |
46de3c |
# more than 6 short items.
|
|
Alain Reguera Delgado |
46de3c |
# You MUST use Unicode strings here, but you need not use localized
|
|
Alain Reguera Delgado |
46de3c |
# page names for system and help pages, those will be used automatically
|
|
Alain Reguera Delgado |
46de3c |
# according to the user selected language. [Unicode]
|
|
Alain Reguera Delgado |
46de3c |
navi_bar = [
|
|
Alain Reguera Delgado |
46de3c |
# If you want to show your page_front_page here:
|
|
Alain Reguera Delgado |
46de3c |
#u'%(page_front_page)s',
|
|
Alain Reguera Delgado |
46de3c |
u'RecentChanges',
|
|
Alain Reguera Delgado |
46de3c |
u'FindPage',
|
|
Alain Reguera Delgado |
46de3c |
u'SiteNavigation',
|
|
Alain Reguera Delgado |
46de3c |
u'HelpContents',
|
|
Alain Reguera Delgado |
46de3c |
]
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# The default theme anonymous or new users get
|
|
Alain Reguera Delgado |
46de3c |
theme_default = 'modern'
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Language options --------------------------------------------------
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# See http://moinmoin.wikiwikiweb.de/ConfigMarket for configuration in
|
|
Alain Reguera Delgado |
46de3c |
# YOUR language that other people contributed.
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# The main wiki language, set the direction of the wiki pages
|
|
Alain Reguera Delgado |
46de3c |
language_default = '${WIKILANGUAGE}'
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# You must use Unicode strings here [Unicode]
|
|
Alain Reguera Delgado |
46de3c |
page_category_regex = u'^Category[A-Z]'
|
|
Alain Reguera Delgado |
46de3c |
page_dict_regex = u'[a-z]Dict$'
|
|
Alain Reguera Delgado |
46de3c |
page_form_regex = u'[a-z]Form$'
|
|
Alain Reguera Delgado |
46de3c |
page_group_regex = u'[a-z]Group$'
|
|
Alain Reguera Delgado |
46de3c |
page_template_regex = u'[a-z]Template$'
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Content options ---------------------------------------------------
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Show users hostnames in RecentChanges
|
|
Alain Reguera Delgado |
46de3c |
show_hosts = 1
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Enable graphical charts, requires gdchart.
|
|
Alain Reguera Delgado |
46de3c |
#chart_options = {'width': 600, 'height': 300}
|
|
Alain Reguera Delgado |
46de3c |
WIKICONFIG
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# Uncomment some options in the wikiconfig.py file if ...
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
if [ "$WIKISUPERUSER" != "" ]; then
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
sed -i -e '
|
|
Alain Reguera Delgado |
46de3c |
/#superuser/s/#//
|
|
Alain Reguera Delgado |
46de3c |
s/YourName/'$WIKISUPERUSER'/' ${WIKIINSTANCE}/cgi-bin/wikiconfig.py
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
fi
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
if [ "$WIKIRESTRICTEDIT" = "yes" ]; then
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
sed -i -r -e '
|
|
Alain Reguera Delgado |
46de3c |
/#acl_rights_before/s/#//
|
|
Alain Reguera Delgado |
46de3c |
/#acl_rights_default/s/#//
|
|
Alain Reguera Delgado |
46de3c |
/#[\t ]*u"EditGroup/s/#//
|
|
Alain Reguera Delgado |
46de3c |
/#[\t ]*u"AdminGroup/s/#//' ${WIKIINSTANCE}/cgi-bin/wikiconfig.py
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
fi
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
if [ "$WIKIMAILSMARTHOST" != "" ]; then
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
sed -i -e '
|
|
Alain Reguera Delgado |
46de3c |
/#mail_smarthost/s/#//' ${WIKIINSTANCE}/cgi-bin/wikiconfig.py
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
fi
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
if [ "$WIKIMAILFROM" != "" ];then
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
sed -i -e '
|
|
Alain Reguera Delgado |
46de3c |
/#mail_from/s/#//' ${WIKIINSTANCE}/cgi-bin/wikiconfig.py
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
fi
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
if [ "$WIKIMAILLOGIN" != "" ];then
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
sed -i -e '
|
|
Alain Reguera Delgado |
46de3c |
/#mail_login/s/#//' ${WIKIINSTANCE}/cgi-bin/wikiconfig.py
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
fi
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# File Permissions
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# Here we set the file permissons to the created and copied
|
|
Alain Reguera Delgado |
46de3c |
# files.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
echo 'Setting permissions ...'
|
|
Alain Reguera Delgado |
46de3c |
chown -R $USER.$GROUP $WIKIINSTANCE
|
|
Alain Reguera Delgado |
46de3c |
chmod -R 750 $WIKIINSTANCE
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Last Message
|
|
Alain Reguera Delgado |
46de3c |
echo '---------------------------------------------'
|
|
Alain Reguera Delgado |
46de3c |
echo ' *** The wiki instance had been created! *** '
|
|
Alain Reguera Delgado |
46de3c |
echo '---------------------------------------------'
|
|
Alain Reguera Delgado |
46de3c |
echo 'To finish the installation do the following:'
|
|
Alain Reguera Delgado |
46de3c |
echo " 1. Restart the Web Server (service httpd restart)"
|
|
Alain Reguera Delgado |
46de3c |
echo " 2. Open your browser and try the address: http://localhost/${WIKIALIAS}"
|
|
Alain Reguera Delgado |
46de3c |
echo ' 3. Enjoy your installed wiki :).'
|
|
Alain Reguera Delgado |
46de3c |
echo ''
|