summarylogtreecommitdiffstats
path: root/ruby-mailcatcher.install
blob: aabd97d8a879fe9989df5902c4bb95050a7111aa (plain)
1
2
3
4
5
6
7
8
9
10
11
post_install() {
  echo ">>> Start mailcatcher using the mailcatcher.service unit file. (The default SMTP and HTTP ports are 1025 and 1080, respectively.)"
  echo ">>> Or, socket-activate mailcatcher with another port for either or both using: mailcatcher-smtp@.socket or mailcatcher-http@.socket."
}

pre_remove() {
  for unit in mailcatcher{.service,-{http,smtp}{.service,@.socket}}; do
    systemctl --quiet is-active $unit && systemctl stop $unit
    systemctl --quiet is-enabled $unit && systemctl disable $unit
  done
}