diff --git a/files/Install-Mastodon-Phase2.sh b/files/Install-Mastodon-Phase2.sh index 8b72a78..0d56a1c 100644 --- a/files/Install-Mastodon-Phase2.sh +++ b/files/Install-Mastodon-Phase2.sh @@ -17,15 +17,13 @@ fi if true; then adduser --disabled-password --disabled-login --gecos "" mastodon || exit 3 - chmod +r Install*.sh;chmod +x Install*.sh - cp Install-Mastodon-Phase3.sh Install-Mastodon-Phase4.sh /home/mastodon || exit 4 - chown -R mastodon /home/mastodon || exit 5 - chmod +x /home/mastodon/Install*.sh + chmod +r Install*.sh;chmod +x Install*.sh || exit 4 + if [ -e ./Install-Mastodon-CreatePSQL-User.sh ] then # Creation de l'utilisateur Postgresql postgres - cp -f Install-Mastodon-CreatePSQL-User.sh /tmp || exit 6 - chmod 644 /tmp/Install*.sh + cp -f Install-Mastodon-CreatePSQL-User.sh /tmp || exit 5 + chmod 644 /tmp/Install*.sh || exit 6 chmod +x /tmp/Install*.sh || exit 7 su - postgres -c /tmp/Install-Mastodon-CreatePSQL-User.sh || exit 8 rm -f /tmp/Install*.sh @@ -46,6 +44,9 @@ if true; then fi if true; then - su - mastodon -c ./Install-Mastodon-Phase3.sh || exit 18 - su - mastodon -c ./Install-Mastodon-Phase4.sh || exit 19 + cp Install-Mastodon-Phase3.sh Install-Mastodon-Phase4.sh /home/mastodon || exit 18 + chown -R mastodon /home/mastodon || exit 19 + chmod +x /home/mastodon/Install*.sh + su - mastodon -c ./Install-Mastodon-Phase3.sh || exit 20 + su - mastodon -c ./Install-Mastodon-Phase4.sh || exit 21 fi diff --git a/files/Install-Mastodon-Phase3.sh b/files/Install-Mastodon-Phase3.sh index b9fc83f..9695f17 100644 --- a/files/Install-Mastodon-Phase3.sh +++ b/files/Install-Mastodon-Phase3.sh @@ -1,6 +1,6 @@ #!/bin/bash # https://anystack.xyz/how-to-install-mastodon-ubuntu/ -echo Phase 3: Preparation de l'environnement +echo "Phase 3: Preparation de l\'environnement" git clone https://github.com/rbenv/rbenv.git ~/.rbenv || exit 101 echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc