mirror of
https://github.com/nodemailer/wildduck.git
synced 2024-12-28 03:07:13 +08:00
52 lines
2.1 KiB
Bash
52 lines
2.1 KiB
Bash
#! /bin/bash
|
|
|
|
OURNAME=04_install_import_keys.sh
|
|
|
|
echo -e "\n-- Executing ${ORANGE}${OURNAME}${NC} subscript --"
|
|
|
|
# create user for running applications
|
|
useradd wildduck || echo "User wildduck already exists"
|
|
|
|
# remove old sudoers file
|
|
rm -rf /etc/sudoers.d/wildduck
|
|
|
|
# create user for deploying code
|
|
useradd deploy || echo "User deploy already exists"
|
|
|
|
mkdir -p /home/deploy/.ssh
|
|
# add your own key to the authorized_keys file
|
|
echo "# Add your public key here
|
|
" >> /home/deploy/.ssh/authorized_keys
|
|
chown -R deploy:deploy /home/deploy
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
# nodejs
|
|
wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
|
|
echo "deb https://deb.nodesource.com/$NODEREPO $CODENAME main" > /etc/apt/sources.list.d/nodesource.list
|
|
echo "deb-src https://deb.nodesource.com/$NODEREPO $CODENAME main" >> /etc/apt/sources.list.d/nodesource.list
|
|
|
|
# mongo keys
|
|
wget -qO- https://www.mongodb.org/static/pgp/server-${MONGODB}.asc | sudo apt-key add
|
|
# hardcode xenial as at this time there are no non-dev packages for bionic (http://repo.mongodb.org/apt/ubuntu/dists/)
|
|
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/$MONGODB multiverse" > /etc/apt/sources.list.d/mongodb-org.list
|
|
|
|
# tor keys
|
|
# Setup tor to be able to send emails to .onion network.
|
|
# Receiving from onion is not automatically set up, you would have to
|
|
# create a hidden servcie first and then bridge port 25
|
|
# uncomment if you want to support TOR
|
|
|
|
#echo "deb http://deb.torproject.org/torproject.org $CODENAME main
|
|
#deb-src http://deb.torproject.org/torproject.org $CODENAME main" > /etc/apt/sources.list.d/tor.list
|
|
#gpg --keyserver keys.gnupg.net --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
|
|
#gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
|
|
|
|
# rspamd
|
|
wget -O- https://rspamd.com/apt-stable/gpg.key | apt-key add -
|
|
echo "deb http://rspamd.com/apt-stable/ $CODENAME main" > /etc/apt/sources.list.d/rspamd.list
|
|
echo "deb-src http://rspamd.com/apt-stable/ $CODENAME main" >> /etc/apt/sources.list.d/rspamd.list
|
|
apt-get update
|
|
|
|
# redis
|
|
apt-add-repository -y ppa:chris-lea/redis-server
|