| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # postrm script for dmarcts-report-parser |
| 3 | |
| 4 | set -e |
| 5 | |
| 6 | # summary of how this script can be called: |
| 7 | # * <postrm> `remove' |
| 8 | # * <postrm> `purge' |
| 9 | # * <old-postrm> `upgrade' <new-version> |
| 10 | # * <new-postrm> `failed-upgrade' <old-version> |
| 11 | # * <new-postrm> `abort-install' |
| 12 | # * <new-postrm> `abort-install' <old-version> |
| 13 | # * <new-postrm> `abort-upgrade' <old-version> |
| 14 | # * <disappearer's-postrm> `disappear' <overwriter> |
| 15 | # <overwriter-version> |
| 16 | # for details, see https://www.debian.org/doc/debian-policy/ or |
| 17 | # the debian-policy package |
| 18 | |
| 19 | set -e |
| 20 | |
| 21 | case "${1}" in |
| 22 | 'purge') |
| 23 | getentscip-shell system . . getent. passwd '_dmarcts' 2>/dev/nullscip-shell filesystem . . `/dev/null`. 1> /dev/nullscip-shell filesystem . . `/dev/null`. \ |
| 24 | && deluserscip-shell system . . deluser. '_dmarcts' \ |
| 25 | || truescip-shell system . . true. |
| 26 | getentscip-shell system . . getent. group '_dmarcts' 2>/dev/nullscip-shell filesystem . . `/dev/null`. 1> /dev/nullscip-shell filesystem . . `/dev/null`. \ |
| 27 | && delgroupscip-shell system . . delgroup. '_dmarcts' \ |
| 28 | || truescip-shell system . . true. |
| 29 | ;; |
| 30 | |
| 31 | 'remove'|'upgrade'|'failed-upgrade'|'abort-install'|'abort-upgrade'|'disappear') |
| 32 | ;; |
| 33 | *) |
| 34 | echoscip-shell system . . echo. "postrm called with unknown argument '${1}'" >&2 |
| 35 | exit 1 |
| 36 | ;; |
| 37 | esac |
| 38 | |
| 39 | # dh_installdeb will replace this with shell code automatically |
| 40 | # generated by other debhelper scripts. |
| 41 | |
| 42 | #DEBHELPER# |
| 43 | |
| 44 | exit 0 |