Mise à jour fichier deployUsersv3.sh

This commit is contained in:
yann.lereuille 2025-03-24 09:18:07 +01:00
parent 18910e6b1a
commit dedb21e2ac

View File

@ -2,9 +2,9 @@
# Ip passée en paramètre # Ip passée en paramètre
ip=$1 ip=$1
user=$user user=root
workdir=/$user/deploy workdir=/$user/deploy
ssh $user@$ip "mkdir $workdir" 2> /dev/null ssh $user@$ip "mkdir -p $workdir" 2> /dev/null
scp "./createGroups.sh" "./logins.csv" "Users.csv" "createUsers.sh" $user@$ip:$workdir scp "./createGroups.sh" "./logins.csv" "Users.csv" "createUsers.sh" $user@$ip:$workdir
ssh $user@$ip << EOF ssh $user@$ip << EOF
bash $workdir/createGroups.sh bash $workdir/createGroups.sh