diff --git a/install_mailhog_as_service.sh b/install_mailhog_as_service.sh new file mode 100644 index 0000000..ec7ecc4 --- /dev/null +++ b/install_mailhog_as_service.sh @@ -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 < /dev/null 2>&1 & +[Install] +WantedBy=multi-user.target +EOL diff --git a/testserver.sh b/testserver.sh index ce64e03..f99b74f 100755 --- a/testserver.sh +++ b/testserver.sh @@ -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! ------"; \ No newline at end of file +#touch /tmp/x.txt; \ No newline at end of file