wildduck/setup/04_install_import_keys.sh

50 lines
1.7 KiB
Bash
Raw Normal View History

#! /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
2018-08-06 14:27:36 +08:00
# 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
2018-08-06 14:27:36 +08:00
# mongo keys
2021-06-25 21:38:51 +08:00
# ubuntu focal is supported as of 2021-06-14!
2021-06-30 23:39:38 +08:00
MONGORELEASE=$CODENAME
2021-06-25 21:38:51 +08:00
# if [ "$MONGORELEASE" = "focal" ]; then
2020-07-01 15:37:28 +08:00
# Ubuntu 20 is not yet supported (as of 2020-07-01), fallback to 18
2021-06-25 21:38:51 +08:00
# MONGORELEASE="bionic"
# fi
2020-07-01 15:37:28 +08:00
wget -qO- https://www.mongodb.org/static/pgp/server-${MONGODB}.asc | apt-key add
2020-07-01 15:37:28 +08:00
echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu $MONGORELEASE/mongodb-org/$MONGODB multiverse" > /etc/apt/sources.list.d/mongodb-org.list
# 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
2018-08-06 14:27:36 +08:00
# redis
2021-06-25 21:38:51 +08:00
# use redis team repo
add-apt-repository -y ppa:redislabs/redis
# apt-add-repository -y ppa:chris-lea/redis-server