Created
June 12, 2013 15:50
-
-
Save biinari/5766564 to your computer and use it in GitHub Desktop.
Upstart script for http://mailcatcher.me/
/etc/init/mailcatcher.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "Mailcatcher" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
pre-start script | |
bash << "EOF" | |
mkdir -p /var/log/mailcatcher | |
chown -R vagrant /var/log/mailcatcher | |
EOF | |
end script | |
exec su - vagrant -c 'mailcatcher --http-ip=0.0.0.0 &>>/var/log/mailcatcher/mailcatcher.log' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for this script! One suggestion for improvement:
I use the
-f
flag and remove the ampersand&
. This makes mailcatcher run in the foreground and upstart can detect if the service is running or not.