-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmailcatcher.sh
29 lines (26 loc) · 982 Bytes
/
mailcatcher.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
#--------------------------------------------------
# Update Server
#--------------------------------------------------
echo -e "\n---- Update Server ----"
sudo apt-get update
sudo apt-get upgrade -y
#--------------------------------------------------
# Install Mail Catcher
#--------------------------------------------------
echo -e "\n---- Install Mail Catcher ----"
sudo apt-get install -y build-essential checkinstall
sudo apt-get install -y libsqlite3-dev ruby2.0 ruby2.0-dev
sudo gem2.0 install mailcatcher
#--------------------------------------------------
# Create Startup Script for Mail Catcher
#--------------------------------------------------
echo -e "\n---- Create Startup for Mail Catcher ----"
cat <<EOT > /etc/init/mailcatcher.conf
description "Mailcatcher"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec /usr/bin/env $(which mailcatcher) --foreground --http-ip=0.0.0.0 --smtp-ip=0.0.0.0
EOT
sudo service mailcatcher start