Create A Systemd Script For Mailcatcher
How to create a systemd script to auto-start mailcatcher#
A lot of this stuff needs to be done as root so you might as well log in as root with sudo su -
-
go to:
/lib/systemd/system. This is where systemd scripts usually are placed. -
Create the service:
vim mailcatcher.service -
Put the following contents in there:
[Unit] Description=Mailcatcher Service [Service] Type=simple ExecStart=/usr/local/bin/mailcatcher Restart=always [Install] WantedBy=multi-user.target -
Enable the mailcatcher service and automatically create the symlink to
enable mailcatcher.service -
To enable boot time start you need to symlink it to
/etc/systemd/systemwith:ln -s /lib/systemd/mailcatcher.service /etc/systemd/system/mailcatcher.service