1 | #!/bin/sh |
---|
2 | # postrm script for php5-lliurex-compat |
---|
3 | # |
---|
4 | # see: dh_installdeb(1) |
---|
5 | |
---|
6 | set -e |
---|
7 | |
---|
8 | # summary of how this script can be called: |
---|
9 | # * <postrm> `remove' |
---|
10 | # * <postrm> `purge' |
---|
11 | # * <old-postrm> `upgrade' <new-version> |
---|
12 | # * <new-postrm> `failed-upgrade' <old-version> |
---|
13 | # * <new-postrm> `abort-install' |
---|
14 | # * <new-postrm> `abort-install' <old-version> |
---|
15 | # * <new-postrm> `abort-upgrade' <old-version> |
---|
16 | # * <disappearer's-postrm> `disappear' <overwriter> |
---|
17 | # <overwriter-version> |
---|
18 | # for details, see https://www.debian.org/doc/debian-policy/ or |
---|
19 | # the debian-policy package |
---|
20 | NOW=$(date +'%Y%m%d%m%s') |
---|
21 | |
---|
22 | case "$1" in |
---|
23 | purge|remove|disappear) |
---|
24 | if [ -d /etc/apache2-lliurex ]; then |
---|
25 | mv /etc/apache2-lliurex /etc/apache2-lliurex-${NOW} |
---|
26 | fi |
---|
27 | for l in /usr/local/sbin/a*-lliurex; do |
---|
28 | rm -f ${l} |
---|
29 | done |
---|
30 | if [ -d /var/log/apache2-lliurex ]; then |
---|
31 | mv /var/log/apache2-lliurex /var/log/apache2-lliurex-${NOW} |
---|
32 | fi |
---|
33 | if [ -f /etc/init.d/apache2-lliurex ]; then |
---|
34 | mv /etc/init.d/apache2-lliurex /etc/apache2-lliurex-${NOW}/apache2-lliurex.init-d |
---|
35 | fi |
---|
36 | if [ -f /etc/logrotate.d/apache2-lliurex ]; then |
---|
37 | mv /etc/logrotate.d/apache2-lliurex /etc/apache2-lliurex-${NOW}/apache2-lliurex.logrotate |
---|
38 | fi |
---|
39 | ;; |
---|
40 | |
---|
41 | upgrade|failed-upgrade|abort-install|abort-upgrade) |
---|
42 | ;; |
---|
43 | *) |
---|
44 | echo "postrm called with unknown argument \`$1'" >&2 |
---|
45 | exit 1 |
---|
46 | ;; |
---|
47 | esac |
---|
48 | |
---|
49 | # dh_installdeb will replace this with shell code automatically |
---|
50 | # generated by other debhelper scripts. |
---|
51 | |
---|
52 | #DEBHELPER# |
---|
53 | |
---|
54 | exit 0 |
---|