From 8271f3984b9213e22f15d66728725e092d8ab716 Mon Sep 17 00:00:00 2001 From: "yann.lereuille" Date: Mon, 24 Mar 2025 09:02:55 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20fichier=20deployUsers.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sisr1/tp04_scripts_admin/tp04/deployUsers.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sisr1/tp04_scripts_admin/tp04/deployUsers.sh b/sisr1/tp04_scripts_admin/tp04/deployUsers.sh index 249a6ff..c66c749 100644 --- a/sisr1/tp04_scripts_admin/tp04/deployUsers.sh +++ b/sisr1/tp04_scripts_admin/tp04/deployUsers.sh @@ -2,11 +2,12 @@ # Ip passée en paramètre ip=$1 -workdir=/root/deploy -ssh root@$ip "mkdir $workdir" 2> /dev/null -scp "./createGroups.sh" "./logins.csv" "createUsers.sh" root@$ip:$workdir -ssh root@$ip >> EOF - bash createGroups.sh - bash createUsers.sh +user=$user +workdir=/$user/deploy +ssh $user@$ip "mkdir $workdir" 2> /dev/null +scp "./createGroups.sh" "./logins.csv" "Users.csv" "createUsers.sh" $user@$ip:$workdir +ssh $user@$ip >> EOF + bash $workdir/createGroups.sh + bash $workdir/createUsers.sh rm -R $workdir EOF \ No newline at end of file