18 lines
336 B
Bash
18 lines
336 B
Bash
#!/bin/bash
|
|
|
|
ip=$1
|
|
|
|
chemin=/root/deploy
|
|
user=root
|
|
|
|
ssh $user@$ip "mkdir $chemin" 2> /dev/null
|
|
|
|
scp createGroups.sh $user@$ip:$chemin
|
|
scp createUser.sh $user@$ip:$chemin
|
|
scp logins.csv $user@$ip:$chemin
|
|
scp Users.csv $user@$ip:$chemin
|
|
|
|
ssh $user@$ip "cd $chemin bash createGroups.sh ; bash createUsers.sh"
|
|
|
|
|
|
ssh $user@$ip "rm -R $chemin" |