| 1 | #!/bin/sh |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | if [ -n "$EX4DEBUG" ]; then |
| 6 | echo "now debugging $0 $@" |
| 7 | set -x |
| 8 | fi |
| 9 | |
| 10 | case "$1" in |
| 11 | remove|upgrade) |
| 12 | if [ -x /etc/init.d/exim4 ]; then |
| 13 | if [ -n "$EX4DEBUG" ]; then |
| 14 | netstat -tulpen |
| 15 | ls -al /run/exim4/ |
| 16 | cat /run/exim4/exim.pid |
| 17 | pidof exim4 |
| 18 | fi |
| 19 | invoke-rc.d exim4 stop |
| 20 | if [ -n "$EX4DEBUG" ]; then |
| 21 | netstat -tulpen |
| 22 | ls -al /run/exim4/ |
| 23 | cat /run/exim4/exim.pid |
| 24 | pidof exim4 |
| 25 | if pidof exim4; then |
| 26 | echo >&2 "WARN: There are some exim4 processes still running after stopping exim" |
| 27 | fi |
| 28 | fi |
| 29 | fi |
| 30 | ;; |
| 31 | esac |
| 32 | |
| 33 | #DEBHELPER# |