This file is indexed.

postinst is in jspwiki 2.8.0-5.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash

set -e

. /usr/share/debconf/confmodule

# retrieve the tomcat6 user
db_get tomcat6/username && TOMCAT6_USER="$RET" || TOMCAT6_USER="tomcat6"

cd /var/lib/jspwiki
if [[ ! -f default/Main.txt ]];
then
    tar --extract --gunzip --keep-old-files --file /usr/share/doc/jspwiki/examples/wikipages.tar.gz || true
    chown -R $TOMCAT6_USER default
fi

set +e
head -1 /etc/jspwiki/jspwiki.properties | grep -q "This file is managed by Debconf" || exit 0
set -e

db_get jspwiki/applicationname
APPLICATION="$RET"
db_get jspwiki/baseurl
BASEURL="$RET"
db_get jspwiki/pageprovider
PROVIDER="$RET"
db_get jspwiki/usepagecache
CACHE="$RET"
db_get jspwiki/encoding
ENCODING="$RET"
db_get jspwiki/breaktitlewithspaces
BREAKTITLE="$RET"
db_get jspwiki/matchenglishplurals
MATCHPLURALS="$RET"
db_get jspwiki/camelcaselinks
CAMELCASE="$RET"

db_stop || true

TEMPFILE=`tempfile`
sed -e "s/^jspwiki\.applicationName.*/jspwiki.applicationName = $APPLICATION/" -e "s!^jspwiki\.baseURL.*!jspwiki.baseURL = $BASEURL!" -e "s/^jspwiki.pageProvider.*/jspwiki.pageProvider = $PROVIDER/" -e "s/^jspwiki.usePageCache.*/jspwiki.usePageCache = $CACHE/" -e "s/^jspwiki.encoding.*/jspwiki.encoding = $ENCODING/" -e "s/^jspwiki.breakTitleWithSpaces.*/jspwiki.breakTitleWithSpaces = $BREAKTITLE/" -e "s/^jspwiki.translatorReader.matchEnglishPlurals.*/jspwiki.translatorReader.matchEnglishPlurals = $MATCHPLURALS/" -e "s/^jspwiki.translatorReader.camelCaseLinks.*/jspwiki.translatorReader.camelCaseLinks = $CAMELCASE/" /etc/jspwiki/jspwiki.properties > $TEMPFILE
mv $TEMPFILE /etc/jspwiki/jspwiki.properties
chmod go+r /etc/jspwiki/jspwiki.properties