Update 2 files

- /testserver.sh
- /install_mailhog_as_service.sh
This commit is contained in:
2023-10-30 21:47:16 +00:00
parent 30e35be0a8
commit 4ec07aa8f0
2 changed files with 35 additions and 7 deletions

View File

@@ -0,0 +1,34 @@
#!/bin/bash
echo "";
echo "===================================";
echo "Installing golang-go...";
echo "===================================";
apt-get -y install golang-go;
echo "";
echo "===================================";
echo "Installing mailhog...";
echo "===================================";
go install github.com/mailhog/MailHog@latest;
echo "";
echo "===================================";
echo "Mailcatcher installed succesfully!";
echo "===================================";
echo "";
echo "===================================";
echo "Copy Mailhog to bin...";
echo "===================================";
sudo cp ~/go/bin/MailHog /usr/local/bin/MailHog
echo "";
echo "===================================";
echo "Create MailHog service...";
echo "===================================";
sudo tee /etc/systemd/system/mailhog.service <<EOL
[Unit]
Description=MailHog
After=network.target
[Service]
User=root
ExecStart=/usr/bin/env /usr/local/bin/MailHog > /dev/null 2>&1 &
[Install]
WantedBy=multi-user.target
EOL

View File

@@ -1,7 +1 @@
#!/bin/bash
#touch /tmp/x.txt;
echo "Installing golang-go...";
apt-get -y install golang-go;
echo "Installing mailhog...";
go install github.com/mailhog/MailHog@latest;
echo "------ Mailcatcher installed succesfully! ------";
#touch /tmp/x.txt;