Skip to content

Instantly share code, notes, and snippets.

@oppara
Created May 17, 2014 10:43
Show Gist options
  • Select an option

  • Save oppara/c4233b289c86e2b3cb66 to your computer and use it in GitHub Desktop.

Select an option

Save oppara/c4233b289c86e2b3cb66 to your computer and use it in GitHub Desktop.
mailcatcher chkconfig
#!/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
@oppara
Copy link
Author

oppara commented May 17, 2014

  # cp /path/to/mailcatcher /etc/init.d/
  # chmod 0755 /etc/init.d/mailcatcher
  # chkconfig --add mailcatcher
  # chkconfig mailcatcher on
  # /etc/init.d/mailcatcher start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment