From 18a5acced8b46811b9b1b630d33e4d8e30843a76 Mon Sep 17 00:00:00 2001 From: southerntofu Date: Thu, 16 Apr 2020 11:34:54 +0200 Subject: [PATCH] =?UTF-8?q?deploy.sh=20a=20besoin=20d'=C3=AAtre=20root=20p?= =?UTF-8?q?our=20une=20application=20locale=20de=20la=20recette?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deploy.sh b/deploy.sh index 2378270..89e7e2a 100755 --- a/deploy.sh +++ b/deploy.sh @@ -30,6 +30,13 @@ if [[ $REMOTE = false ]]; then echo " Pour configurer ton serveur, tu peux repartir du fichier d'exemple config.default.yml: \`cp config.default.yml config.yml\`. Voir le manuel d'administration dans le ficher \`docs/administrateurice.md\`." exit 1 fi + + # Vérifier qu'on exécute le playbook en root, sinon on a pas assez de privilèges et ça ne sert à rien! + if [[ "$EUID" != 0 ]]; then + echo "ERREUR: Ce script doit être exécuté en root si exécuté localement." + echo " Tu veux que je configure quoi pour toi si j'ai pas les permissions? ;)" + exit 2 + fi CMD="$CMD --connection=local --inventory 127.0.0.1, --limit 127.0.0.1" fi