Aline Freitas | b23d05f | 2014-04-16 01:34:52 -0300 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | set -e |
| 3 | |
| 4 | case "$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 | ;; |
| 33 | esac |
| 34 | |
| 35 | #DEBHELPER# |
| 36 | |
| 37 | exit 0 |