Premier jet des scripts d'installation de l'instance Mastodon

This commit is contained in:
2018-05-06 14:01:46 +02:00
parent 9f8fc793d7
commit 9e9cfe8148
4 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#!/bin/bash
# Check if it is a Ubuntu host
/usr/bin/lsb_release -d|cut -d ":" -f 2|grep -i ubuntu|grep "16.04" 1>/dev/null
if [ $? == 0 ]
then
echo "C'est bien une Ubuntu"
else
exit 1
fi
apt-get install -y redis-server redis-tools postgresql postgresql-contrib || exit 2
sed -i '/^local.*postgres.*peer$/a host all all 127.0.0.1/32 ident' /etc/postgresql/9.?/main/pg_hba.conf || exit 3
apt-get -y install pidentd && sudo systemctl enable pidentd && sudo systemctl start pidentd || exit 4
systemctl restart postgresql || exit 5
apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev || exit 6
apt-get install -y libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev || exit 7
apt-get install -y libgdbm3 libgdbm-dev || exit 8
adduser -m --disabled-password --disabled-login mastodon || exit 9
cp Install-Mastodon-Phase3.sh /home/mastodon
chown -R mastodon:mastodon /home/mastodon
su - mastodon -C Install-Mastodon-Phase3.sh