2025-03-24 09:24:15 +01:00

22 lines
413 B
Bash

#!/bin/bash
ip=$1
workdir=/root/deploy
ssh $user@$ip "mkdir $workdir" 2> /dev/null
scp createGroups.sh $user$ip:$workdir
scp createUser.sh $user$ip:$workdir
scp login.csv $user$ip:$workdir
scp Users.csv $user$ip:$workdir
# exécution des scripts
ssh $user@$ip "bash $workdir/createGroups.sh"
ssh $user@$ip "bash $workdir/createUsers.sh"
ssh root@$ip "rm -R $workdir" # suppression répertoire et scripts