#!/bin/bash set -x export DEBIAN_FRONTEND=noninteractive MRUM="main restricted universe multiverse" COUNTRY="$(curl ipinfo.io | jq -r .country)" #M="mirror://mirrors.ubuntu.com/mirrors.txt" M="http://$COUNTRY.archive.ubuntu.com/ubuntu" R="$(lsb_release -cs)" cat > /etc/apt/sources.list </dev/null echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list apt update apt install -y \ autoconf \ bison \ build-essential \ daemontools \ ffmpeg \ file \ g++ \ gcc \ git \ imagemagick \ libffi-dev \ libgdbm-dev \ libgdbm6 \ libicu-dev \ libidn11-dev \ libjemalloc-dev \ libncurses5-dev \ libpq-dev \ libprotobuf-dev \ libreadline6-dev \ libssl-dev \ libxml2-dev \ libxslt1-dev \ libyaml-dev \ mailutils \ nginx \ nodejs \ pkg-config \ postfix \ postgresql \ postgresql-contrib \ protobuf-compiler \ redis-server \ redis-tools \ rsync \ yarn \ zlib1g-dev addgroup --gid $GID mastodon useradd --uid $UID --gid $GID --shell /bin/bash -m -d /mastodon mastodon