-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·21 lines (17 loc) · 966 Bytes
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
adduser mailcatcher --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password
mkdir /opt
cd /opt || exit
git clone https://github.com/maildev/maildev ./mailcatcher -b v2.0.5
cd /usr/local/hestia/plugins/mailcatcher || exit
rsync -r ./src/ /opt/mailcatcher
chown -R mailcatcher:mailcatcher /opt/mailcatcher
runuser -s /bin/bash -l mailcatcher -c "cd /opt/mailcatcher && export NVM_DIR=/opt/nvm && source /opt/nvm/nvm.sh && nvm use v16 && npm install"
# Swap out sendmail for mailcatcher
if [ ! -L /usr/sbin/sendmail.pre-mailcatcher-sav ] ; then
mv /usr/sbin/sendmail /usr/sbin/sendmail.pre-mailcatcher-sav
fi
ln -s /opt/mailcatcher/bin/sendmail /usr/sbin/sendmail
ln -s /usr/sbin/sendmail /usr/local/bin/sendmail
/usr/local/hestia/bin/v-add-user-notification admin "MailCatcher" "<span style=\"color:white;\"><i class=\"fas fa-envelope\"></i></span> MailCatcher plugin has finished installing."