diff --git a/bin/interoPaheko.sh b/bin/interoPaheko.sh index 8363c19..571188e 100755 --- a/bin/interoPaheko.sh +++ b/bin/interoPaheko.sh @@ -55,8 +55,8 @@ PostMattermost() { PostM=$1 CHANNEL="kaz:Creation-Comptes" . $KAZ_KEY_DIR/env-mattermostAdmin - docker exec -ti ${mattermostServName} bin/mmctl --suppress-warnings auth login $httpProto://$URL_AGORA --name local-server --username $mattermost_user --password $mattermost_pass >/dev/null 2>&1 - docker exec -ti mattermostServ bin/mmctl post create ${CHANNEL} --message ${PostM} >/dev/null 2>&1 + docker exec -t ${mattermostServName} bin/mmctl --suppress-warnings auth login $httpProto://$URL_AGORA --name local-server --username $mattermost_user --password $mattermost_pass >/dev/null 2>&1 + docker exec -t mattermostServ bin/mmctl post create ${CHANNEL} --message ${PostM} >/dev/null 2>&1 } ExpMail() { @@ -105,10 +105,10 @@ Int_paheko_Action() { if [[ "$nom_orga" = null ]] || [[ "$nom_orga" != null && "$id_service" = "7" ]] then [ "$OPTION" = "silence" ] || echo -e "${NC}Abonné ${GREEN}${nom}${NC}" - COMPTE_NOM=$(echo $nom | awk -F' ' '{for (i=1; i != NF; i++); print i;}') + COMPTE_NOM=$(echo ${nom} | awk -F' ' '{for (i=1; i != NF; i++); print i;}') case "${COMPTE_NOM}" in 0|1) - ERRMSG="${ERRMSG} - Il faut corriger le champ nom (il manque un nom ou prénom)" + ERRMSG="${ERRMSG} - ${nom} Il faut corriger le champ nom (il manque un nom ou prénom)" ;; 2) nom_ok=$(echo $nom | awk -F' ' '{print $1}') @@ -122,7 +122,7 @@ Int_paheko_Action() { prenom_ok="${prenom_ok#${sep}}" if [ -z "${nom_ok}" ] || [ -z "${prenom_ok}" ] then - ERRMSG="${ERRMSG} - Il faut corriger le champ nom qui contient plus de 2 infos" + ERRMSG="${ERRMSG} - ${nom} Il faut corriger le champ nom qui contient plus de 2 infos" fi esac # comme l' orga est à null nom orga est a vide, pas d' admin orga, on met dans l' agora générale @@ -136,16 +136,16 @@ Int_paheko_Action() { # L' orga est renseignée dans paheko donc les nom et prenoms sont forcé a nom_orga et Organisation # un équipe agora portera le nom de l' orga, le compte ne sera pas créé dans le nextcloud général # et le compte est admin de son orga - nom_orga=$(echo $nom_orga | tr [:upper:] [:lower:]) + nom_orga=$(echo ${nom_orga} | tr [:upper:] [:lower:]) [ "$OPTION" = "silence" ] || echo -e "${NC}Orga : ${GREEN}${nom_orga}${NC}" nom_ok=$nom_orga # test des caractères autorisés dans le nom d' orga: lettres, chiffres et/ou le tiret if ! [[ "${nom_ok}" =~ ^[[:alnum:]-]+$ ]] then - ERRMSG="${ERRMSG} - L' orga doit être avec des lettres et/ou des chiffres. Le séparateur doit être le tiret" + ERRMSG="${ERRMSG} - ${nom_orga} L' orga doit être avec des lettres et/ou des chiffres. Le séparateur doit être le tiret" fi prenom_ok=organisation - equipe_agora=$nom_orga + equipe_agora=${nom_orga} groupe_nc_base=" " nc_base="N" admin_orga="O"