File: postrm

package info (click to toggle)
dokuwiki 0.0.20061106-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,600 kB
  • ctags: 6,733
  • sloc: php: 52,011; perl: 203; sh: 184; makefile: 51
file content (64 lines) | stat: -rw-r--r-- 1,479 bytes parent folder | download
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh -e

# Postrm script for DokuWiki by Matti Pll <mpo@iki.fi>
# Based on postrm for PHPWiki written by Matthew Palmer.

# No need to handle the Web server in postrm
#if [ "$1" = "remove" ]; then
#    for srv in apache apache2 apache-ssl apache-perl; do
#	if [ -e /etc/$srv/httpd.conf ]; then
#	    
#	    # Remove dokuwiki from the apache configuration
#	    rm -f /etc/$srv/conf.d/dokuwiki.conf
#	    
#	    # Restart apache
#	    if which invoke-rc.d >/dev/null 2>&1; then
#		invoke-rc.d $srv force-reload
#	    else
#		/etc/init.d/$srv force-reload
#	    fi
#	    
#
#
#
#	
#	fi
#    done
#fi

if [ "$1" = "purge" ] && [ -e /usr/share/debconf/confmodule ]; then
    . /usr/share/debconf/confmodule
    db_get dokuwiki/system/purgepages || true
    if [ "$RET" = "true" ]; then
	rm -rf /var/lib/dokuwiki/*
    fi
fi

#DEBHELPER#

if [ "$1" = "purge" ]; then
    rm -f /etc/dokuwiki/apache.conf
    for srv in apache apache2 apache-ssl apache-perl; do
	    rm -f /etc/$srv/conf.d/dokuwiki.conf
    done

    if [ -x /usr/bin/ucf ]; then
	ucf --purge /etc/dokuwiki/apache.conf
    fi

#    rm -f /etc/dokuwiki/*.dpkg-*
#    rm -f /etc/dokuwiki/debian-config.php
#    rm -f /etc/dokuwiki/index.php

    if [ -x /usr/bin/ucf ]; then
	ucf --purge /etc/dokuwiki/index.php
    fi    

    if [ -d /etc/dokuwiki ]; then
	rmdir --ignore-fail-on-non-empty /etc/dokuwiki
    fi
    if [ -d /var/lib/dokuwiki ]; then
	rmdir --ignore-fail-on-non-empty /var/lib/dokuwiki
    fi

fi