File tree 1 file changed +41
-0
lines changed
1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ if [ -f ~ /.homestead-features/wsl_user_name ]; then
4
+ WSL_USER_NAME=" $( cat ~ /.homestead-features/wsl_user_name) "
5
+ WSL_USER_GROUP=" $( cat ~ /.homestead-features/wsl_user_group) "
6
+ else
7
+ WSL_USER_NAME=vagrant
8
+ WSL_USER_GROUP=vagrant
9
+ fi
10
+
11
+ export DEBIAN_FRONTEND=noninteractive
12
+
13
+ if [ -f /home/$WSL_USER_NAME /.homestead-features/mailpit ]
14
+ then
15
+ echo " mailpit already installed."
16
+ exit 0
17
+ fi
18
+
19
+ touch /home/$WSL_USER_NAME /.homestead-features/mailpit
20
+ chown -Rf $WSL_USER_NAME :$WSL_USER_GROUP /home/$WSL_USER_NAME /.homestead-features
21
+
22
+ curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh | sh
23
+
24
+ chown -f $WSL_USER_NAME :$WSL_USER_GROUP /usr/local/bin/mailpit
25
+
26
+ cat > /etc/systemd/system/mailpit.service << EOF
27
+ [Unit]
28
+ Description=Mailpit
29
+ After=network.target
30
+
31
+ [Service]
32
+ User=vagrant
33
+ ExecStart=/usr/bin/env /usr/local/bin/mailpit
34
+
35
+ [Install]
36
+ WantedBy=multi-user.target
37
+ EOF
38
+
39
+ systemctl disable --now mailhog
40
+
41
+ systemctl enable --now mailpit
You can’t perform that action at this time.
0 commit comments