Debian Codegraph @

debian/postrm

raw symbols SCIP
1 #!/bin/bash
2
3 set -e
4
5 if [ "$1" = "upgrade" ]; then
6 exit 0
7 fi
8
9 if [ -f /usr/share/debconf/confmodule ]; then
10 . /usr/share/debconf/confmodule
11 db_version 2.0 || [ $? -lt 30 ]
12
13 rm -f /usr/share/ldap-account-manager/sess
14 rm -f /usr/share/ldap-account-manager/tmp
15 rm -f /usr/share/ldap-account-manager/config
16
17 set +e
18 db_get "ldap-account-manager/config-webserver"
19 if [ $? -eq 0 ]; then
20 set -e
21 webservers="$RET"
22 restart=""
23 for server in $webservers; do
24 server=${server%,}
25 case "$server" in
26 apache2)
27 set +e
28 test -x /usr/sbin/a2query && test -x /usr/sbin/a2disconf || continue
29 a2query -q -c ldap-account-manager && a2disconf -q ldap-account-manager
30 set -e
31 rm -f /etc/$server/conf-available/ldap-account-manager.conf
32 test -x /usr/sbin/$server || continue
33 restart="$restart $server"
34 ;;
35 esac
36 done
37 fi
38
39 set +e
40 db_get "ldap-account-manager/restart-webserver"
41 if [ $? -eq 0 ] && [ "$RET" = "true" ]; then
42 set -e
43 for server in $restart; do
44 server=${server%,}
45 if [ `which invoke-rc.d` ]; then
46 set +e
47 invoke-rc.d $server reload
48 set -e
49 fi
50 done
51 fi
52
53 # 3rd party libs
54 jsThirdPartyLibs='ckeditor jstree'
55 for jsThirdPartyLib in $jsThirdPartyLibs; do
56 if [ -L /usr/share/ldap-account-manager/templates/lib/extra/${jsThirdPartyLib} ] ; then
57 rm /usr/share/ldap-account-manager/templates/lib/extra/${jsThirdPartyLib}
58 fi
59 done
60 if [ -L /usr/share/ldap-account-manager/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib ] ; then
61 rm /usr/share/ldap-account-manager/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib
62 fi
63 if [ -L /usr/share/ldap-account-manager/lib/3rdParty/composer/monolog/monolog/src/Monolog ] ; then
64 rm /usr/share/ldap-account-manager/lib/3rdParty/composer/monolog/monolog/src/Monolog
65 fi
66 if [ -L /usr/share/ldap-account-manager/lib/3rdParty/composer/psr/log/Psr ] ; then
67 rm /usr/share/ldap-account-manager/lib/3rdParty/composer/psr/log/Psr
68 fi
69 if [ -L /usr/share/ldap-account-manager/lib/3rdParty/composer/voku/portable-ascii/src/voku ] ; then
70 rm /usr/share/ldap-account-manager/lib/3rdParty/composer/voku/portable-ascii/src/voku
71 fi
72 if [ -L /usr/share/ldap-account-manager/lib/3rdParty/composer/phpmailer/phpmailer ] ; then
73 rm /usr/share/ldap-account-manager/lib/3rdParty/composer/phpmailer/phpmailer
74 fi
75
76
77 set -e
78 if [ "$1" = "purge" ]; then
79 rm -r -f /usr/share/ldap-account-manager
80 rm -r -f /var/lib/ldap-account-manager
81 db_purge
82 fi
83
84 #DEBHELPER#
85
86 db_stop
87
88 fi
89
90 exit 0