summarylogtreecommitdiffstats
path: root/ruby-mailcatcher.install
diff options
context:
space:
mode:
authorJames An2015-06-11 14:25:55 -0400
committerJames An2015-06-11 14:25:55 -0400
commitd804950fe5cf42fcf2e7aa8e01b47f13647b4947 (patch)
tree7abdd8e11829689df6545d8db5906d983803097f /ruby-mailcatcher.install
parentbcc9166c46492f57638d2d23b7d4a03bcec3d4d4 (diff)
downloadaur-d804950fe5cf42fcf2e7aa8e01b47f13647b4947.tar.gz
Updated ruby-mailcatcher and added to it systemd unit files to run as a socket-activated systemd service.
Diffstat (limited to 'ruby-mailcatcher.install')
-rw-r--r--ruby-mailcatcher.install11
1 files changed, 11 insertions, 0 deletions
diff --git a/ruby-mailcatcher.install b/ruby-mailcatcher.install
new file mode 100644
index 000000000000..b1cd3360d6cd
--- /dev/null
+++ b/ruby-mailcatcher.install
@@ -0,0 +1,11 @@
+post_install() {
+ echo ">>> Start mail catcher at boot by enabling the systemd service unit, mailcatcher.service. (The default SMTP and HTTP ports are 1025 and 1080, respectively.)"
+ echo ">>> Map port 25 (HTTP) and/or port 80 (SMTP) to mail catcher via socket actviation by using mailcatcher-smtp.socket and mailcatcher-http.socket."
+}
+
+pre_remote() {
+ for unit in mailcatcher{,.service,-{http,smtp}.socket}; do
+ systemctl --quiet is-active $unit && systemctl stop $unit
+ systemctl --quiet is-enabled $unit && systemctl disable $unit
+ done
+}