preinst is in dokuwiki 0.0.20160626.a-2.
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 | #!/bin/sh
# preinst for dokuwiki.
set -e
# Restructure the data tree to the new format introduced in the
# 2005-07-01 release
if [ -e "/var/lib/dokuwiki/attic" ] ; then
mv /var/lib/dokuwiki/data /var/lib/dokuwiki/data.tmp
mkdir /var/lib/dokuwiki/data
mv /var/lib/dokuwiki/data.tmp /var/lib/dokuwiki/data/pages
mv /var/lib/dokuwiki/attic /var/lib/dokuwiki/data/
mv /var/lib/dokuwiki/media /var/lib/dokuwiki/data/
fi
if [ $1 = "upgrade" ] ; then
# Backup the .htaccess file managed by ucf that used to be part
# of the package file and would be deleted as a side effect.
# Remove useless ucf associations: these files are part of the
# package and would get deleted or overwritten before ucf
# can do anything.
#
# See bug #506100.
if [ -f /usr/share/dokuwiki/.htaccess -a ! -f /usr/share/dokuwiki/.htaccess.dist ]
then
cp /usr/share/dokuwiki/.htaccess /usr/share/dokuwiki/.htaccess.upgrade
ucf --purge /usr/share/dokuwiki/.htaccess
ucf --purge /var/lib/dokuwiki/data/.htaccess
ucf --purge /usr/share/dokuwiki/bin/.htaccess
ucf --purge /usr/share/dokuwiki/inc/.htaccess
ucf --purge /usr/share/dokuwiki/inc/lang/.htaccess
fi
fi
|