diff --git a/sisr1/tp04_scripts_admin/createGroups.sh b/sisr1/tp04_scripts_admin/createGroups.sh new file mode 100644 index 0000000..4d76d3e --- /dev/null +++ b/sisr1/tp04_scripts_admin/createGroups.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +fichier=./Users.csv + +while read ligne #lis tous les lignes +do + + #A chaque alitéartion, stocker le métier dans $metier + metier=$(echo $ligne | cut -d "," -f5) + echo $metier + if [[ $(grep $metier /etc/group) == "" ]] ; then + groupadd $metier + fi + + +done < $fichier \ No newline at end of file diff --git a/sisr1/tp04_scripts_admin/createLogins.sh b/sisr1/tp04_scripts_admin/createLogins.sh index 3f2bb8f..e69de29 100644 --- a/sisr1/tp04_scripts_admin/createLogins.sh +++ b/sisr1/tp04_scripts_admin/createLogins.sh @@ -1,16 +0,0 @@ -#!bin/bash - -fichier=./Users.csv - -while read ligne #lis tous les lignes -do - - #A chaque alitéartion, stocker le métier dans $metier - metier=$(echo $ligne | cut -d "," -f5) - echo $metier - if [[ $(grep $metier /etc/group) == "" ]] ; then - groupadd $metier - fi - - -done < $fichier \ No newline at end of file diff --git a/sisr1/tp04_scripts_admin/gitpush.sh b/sisr1/tp04_scripts_admin/gitpush.sh new file mode 100644 index 0000000..a2cd914 --- /dev/null +++ b/sisr1/tp04_scripts_admin/gitpush.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +message=$1 +git add . +git commit -m "$message" +git push -u https://timeo.collado@gitea.lyc-lecastel.fr/timeo.collado/siotp.git \ No newline at end of file