I have followed the steps in this tutorial but it wouldn't work.
https://serversforhackers.com/setting-up-mailcatcher
I did however successfully installed mailcatcher and have tested. It is working, however I can't run it as a service.
Anyone knows how to do this in CentOS? Thanks.
All operations made by root or sudoer user.
add to it this content (from https://gist.github.com/oppara/c4233b289c86e2b3cb66) :
#!/bin/sh
# chkconfig: 345 99 1
# description: mailcatcher
# processname: mailcatcher
start() {
echo -n "starting mailcatcher:"
/usr/local/rbenv/shims/mailcatcher --http-ip=0.0.0.0
return 0
}
stop() {
killall mailcatcher
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo $"Usage: $0 {start|stop}"
exit 2
esac
exit 0
make file executable:
chmod +x /etc/init.d/mailcatcheradd service available:
chkconfig --add mailcatcherenable service:
chkconfig mailcatcher onstart or stop service with this command:
service mailcatcher stop|startIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With