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