Skip to content

Instantly share code, notes, and snippets.

Last active January 9, 2023 08:51
  • Star 21 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Mailhog setup with systemd
#!/usr/bin/env bash
echo ">>> Installing Mailhog"
# Download binary from github
wget --quiet -O ~/mailhog
# Make it executable
chmod +x ~/mailhog
# Make it start on reboot
sudo tee /etc/systemd/system/mailhog.service <<EOL
Description=MailHog Service
After=network.service vagrant.mount
ExecStart=/usr/bin/env /home/vagrant/mailhog > /dev/null 2>&1 &
# Start on reboot
sudo systemctl enable mailhog
# Start background service now
sudo systemctl start mailhog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment