diff --git a/sisr1/TP04-Bases-d'administration/deployUsers.sh b/sisr1/TP04-Bases-d'administration/deployUsers.sh new file mode 100644 index 0000000..1f34790 --- /dev/null +++ b/sisr1/TP04-Bases-d'administration/deployUsers.sh @@ -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 \ No newline at end of file diff --git a/sisr1/TP04-Bases-d'administration/gitpush.sh b/sisr1/TP04-Bases-d'administration/gitpush.sh index fd914f0..6461052 100644 --- a/sisr1/TP04-Bases-d'administration/gitpush.sh +++ b/sisr1/TP04-Bases-d'administration/gitpush.sh @@ -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 \ No newline at end of file +git push https://redouane.assani@gitea.lyc-lecastel.fr/redouane.assani/siotp.git \ No newline at end of file