| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | if [scip-shell system . . `[`. "$1" = "upgrade" ]; then |
| 6 | exit 0 |
| 7 | fi |
| 8 | |
| 9 | if [scip-shell system . . `[`. -f /usr/share/debconf/confmodulescip-shell filesystem . . `/usr/share/debconf/confmodule`. ]; then |
| 10 | . /usr/share/debconf/confmodulescip-shell source . . `/usr/share/debconf/confmodule`. |
| 11 | db_version 2.0 || [scip-shell system . . `[`. $? -lt 30 ] |
| 12 | |
| 13 | rmscip-shell system . . rm. -f /usr/share/ldap-account-manager/sessscip-shell filesystem . . `/usr/share/ldap-account-manager/sess`. |
| 14 | rmscip-shell system . . rm. -f /usr/share/ldap-account-manager/tmpscip-shell filesystem . . `/usr/share/ldap-account-manager/tmp`. |
| 15 | rmscip-shell system . . rm. -f /usr/share/ldap-account-manager/configscip-shell filesystem . . `/usr/share/ldap-account-manager/config`. |
| 16 | |
| 17 | set +e |
| 18 | db_get "ldap-account-manager/config-webserver" |
| 19 | if [scip-shell system . . `[`. $? -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 | testscip-shell system . . test. -x /usr/sbin/a2queryscip-shell filesystem . . `/usr/sbin/a2query`. && testscip-shell system . . test. -x /usr/sbin/a2disconfscip-shell filesystem . . `/usr/sbin/a2disconf`. || continue |
| 29 | a2query -q -c ldap-account-manager && a2disconf -q ldap-account-manager |
| 30 | set -e |
| 31 | rmscip-shell system . . rm. -f /etc/$server/conf-available/ldap-account-manager.conf |
| 32 | testscip-shell system . . 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 [scip-shell system . . `[`. $? -eq 0 ] && [scip-shell system . . `[`. "$RET" = "true" ]; then |
| 42 | set -e |
| 43 | for server in $restart; do |
| 44 | server=${server%,} |
| 45 | if [scip-shell system . . `[`. `whichscip-shell system . . which. invoke-rc.d` ]; then |
| 46 | set +e |
| 47 | invoke-rc.dscip-shell system . . `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 [scip-shell system . . `[`. -L /usr/share/ldap-account-manager/templates/lib/extra/${jsThirdPartyLib} ] ; then |
| 57 | rmscip-shell system . . rm. /usr/share/ldap-account-manager/templates/lib/extra/${jsThirdPartyLib} |
| 58 | fi |
| 59 | done |
| 60 | if [scip-shell system . . `[`. -L /usr/share/ldap-account-manager/lib/3rdParty/composer/phpseclib/phpseclib/phpseclibscip-shell filesystem . . `/usr/share/ldap-account-manager/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib`. ] ; then |
| 61 | rmscip-shell system . . rm. /usr/share/ldap-account-manager/lib/3rdParty/composer/phpseclib/phpseclib/phpseclibscip-shell filesystem . . `/usr/share/ldap-account-manager/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib`. |
| 62 | fi |
| 63 | if [scip-shell system . . `[`. -L /usr/share/ldap-account-manager/lib/3rdParty/composer/monolog/monolog/src/Monologscip-shell filesystem . . `/usr/share/ldap-account-manager/lib/3rdParty/composer/monolog/monolog/src/Monolog`. ] ; then |
| 64 | rmscip-shell system . . rm. /usr/share/ldap-account-manager/lib/3rdParty/composer/monolog/monolog/src/Monologscip-shell filesystem . . `/usr/share/ldap-account-manager/lib/3rdParty/composer/monolog/monolog/src/Monolog`. |
| 65 | fi |
| 66 | if [scip-shell system . . `[`. -L /usr/share/ldap-account-manager/lib/3rdParty/composer/psr/log/Psrscip-shell filesystem . . `/usr/share/ldap-account-manager/lib/3rdParty/composer/psr/log/Psr`. ] ; then |
| 67 | rmscip-shell system . . rm. /usr/share/ldap-account-manager/lib/3rdParty/composer/psr/log/Psrscip-shell filesystem . . `/usr/share/ldap-account-manager/lib/3rdParty/composer/psr/log/Psr`. |
| 68 | fi |
| 69 | if [scip-shell system . . `[`. -L /usr/share/ldap-account-manager/lib/3rdParty/composer/voku/portable-ascii/src/vokuscip-shell filesystem . . `/usr/share/ldap-account-manager/lib/3rdParty/composer/voku/portable-ascii/src/voku`. ] ; then |
| 70 | rmscip-shell system . . rm. /usr/share/ldap-account-manager/lib/3rdParty/composer/voku/portable-ascii/src/vokuscip-shell filesystem . . `/usr/share/ldap-account-manager/lib/3rdParty/composer/voku/portable-ascii/src/voku`. |
| 71 | fi |
| 72 | if [scip-shell system . . `[`. -L /usr/share/ldap-account-manager/lib/3rdParty/composer/phpmailer/phpmailerscip-shell filesystem . . `/usr/share/ldap-account-manager/lib/3rdParty/composer/phpmailer/phpmailer`. ] ; then |
| 73 | rmscip-shell system . . rm. /usr/share/ldap-account-manager/lib/3rdParty/composer/phpmailer/phpmailerscip-shell filesystem . . `/usr/share/ldap-account-manager/lib/3rdParty/composer/phpmailer/phpmailer`. |
| 74 | fi |
| 75 | |
| 76 | |
| 77 | set -e |
| 78 | if [scip-shell system . . `[`. "$1" = "purge" ]; then |
| 79 | rmscip-shell system . . rm. -r -f /usr/share/ldap-account-managerscip-shell filesystem . . `/usr/share/ldap-account-manager`. |
| 80 | rmscip-shell system . . rm. -r -f /var/lib/ldap-account-managerscip-shell filesystem . . `/var/lib/ldap-account-manager`. |
| 81 | db_purge |
| 82 | fi |
| 83 | |
| 84 | #DEBHELPER# |
| 85 | |
| 86 | db_stop |
| 87 | |
| 88 | fi |
| 89 | |
| 90 | exit 0 |