deployUsers

This commit is contained in:
redouane.assani 2025-03-24 09:06:31 +01:00
parent 43bdebdec9
commit 7408f2afd4
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,19 @@
#!/bin/bash
ip=$1
user=root
workdir=/$user/deploy
ssh $user@$ip "mkdir $workdir" 2> /dev/null
#copie des scripts et fichier
scp createGroups.sh $user@$ip:$workdir
scp createUsers.sh $user@$ip:$workdir
scp login.csv $user@$ip:$workdir
scp Users.csv $user@$ip:$workdir
#execution des scripts
ssh $user@$ip "bash $workdir/createGroups.sh"
ssh $user@$ip "bash $workdir/createUsers.sh"
ssh $user@$ip "rm -R $workdir" #suppression

View File

@ -13,4 +13,4 @@ git add .
git commit -m "$message"
# Push vers le dépot
git push -u https://redouane.assani@gitea.lyc-lecastel.fr/redouane.assani/siotp.git
git push https://redouane.assani@gitea.lyc-lecastel.fr/redouane.assani/siotp.git