blob: ead53f772528c986cbaa7d1f13182ee6093a64ed [file] [log] [blame] [raw]
Aline Freitasb23d05f2014-04-16 01:34:52 -03001#!/bin/sh
2set -e
3
4case "$1" in
5 install)
6 # If we are doing a fresh install, then these files are no longer needed.
7 # They were around for a very short time and are best simply removed.
8 rm -f /etc/logrotate.d/nginx-full
9 rm -f /etc/logrotate.d/nginx-light
10 rm -f /etc/logrotate.d/nginx-extras
11 rm -f /etc/logrotate.d/nginx-common
12 ;;
13
14 upgrade)
15 # If this is an upgrade, then they might have the UFW profile in the wrong spot.
16 if [ -d /etc/ufw/applications.d/nginx ]; then
17 rm -f /etc/ufw/applications.d/nginx/ufw.profile
18 rmdir /etc/ufw/applications.d/nginx
19 fi
20 rm -f /etc/logrotate.d/nginx-full
21 rm -f /etc/logrotate.d/nginx-light
22 rm -f /etc/logrotate.d/nginx-extras
23 rm -f /etc/logrotate.d/nginx-common
24 ;;
25
26 abort-upgrade)
27 ;;
28
29 *)
30 echo "preinst called with unknown argument \`$1'" >&2
31 exit 1
32 ;;
33esac
34
35#DEBHELPER#
36
37exit 0