source: TOOLS/SYNCHRO_SCRIPTS/synchro_igcmg_to_jeanzay_proxy @ 5959

Last change on this file since 5959 was 5959, checked in by acosce, 3 years ago

Add Romain and Xiaoni login to JeanZay? acl conditions

  • Property svn:executable set to *
File size: 2.6 KB
Line 
1#!/bin/bash
2
3
4echo "script permettant la synchro vers Jean Zay en faisant un rebond via un proxy voir doc sur wiki forge prive "
5
6echo "activation du module ccfr "
7module load ccfr
8
9echo "Quel est votre login sur JeanZay "
10echo -n "Votre reponse : "
11read loginIDRIS
12
13cd /ccc/work/cont003/igcmg/igcmg
14
15echo " Resultat du rsync en dry-run : "
16echo ""
17
18
19
20#ccfr_sync IGCM ${loginIDRIS}@jean-zay.idris.fr:/gpfswork/rech/psl/commun/
21
22rsync -n --omit-dir-times -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c aes128-ctr" --exclude='IGCM/CMIP6/*' IGCM ${loginIDRIS}@jean-zay:/gpfswork/rech/psl/commun/
23
24
25echo "Voulez vous effectuer les actions listees ci dessus oui/non ?"
26echo -n " Votre reponse : "
27read reponse
28
29case ${reponse} in
30
31oui|OUI|o)
32rsync --omit-dir-times -vrltgoD --progress  --delete -e "ssh -ax -o ClearAllForwardings=yes -c aes128-ctr" --exclude='IGCM/CMIP6/*' IGCM ${loginIDRIS}@jean-zay:/gpfswork/rech/psl/commun/
33
34;;
35non|NON|n)
36
37echo "Voulez vous sauvegarder la liste des actions dans un fichier oui/non ?"
38echo -n "Votre reponse : "
39read reponse2
40
41case ${reponse2} in
42
43oui|OUI|o) 
44VAR=`date +%Y-%m-%d`
45NAME=`whoami`
46rsync -n --omit-dir-times -vrltgoD --progress --delete -e "ssh -ax -o ClearAllForwardings=yes -c aes128-ctr" --exclude='IGCM/CMIP6/*' IGCM ${loginIDRIS}@jean-zay:/gpfswork/rech/psl/commun > /ccc/work/cont003/igcmg/igcmg/TMP_SYNC/liste_action_jeanzay_${NAME}_${VAR}.txt
47echo "vous trouverez la liste dans /ccc/work/cont003/igcmg/igcmg/TMP_SYNC/liste_action_jeanzay_${NAME}_${VAR}.txt"
48;;
49non|NON|n) 
50;;
51*)
52echo "Reponse non reconnue"
53;;
54esac
55
56
57echo "FIN SCRIPT SYNCHRO ! nous passons à la mise à jour des droits "
58;;
59*)
60echo "Reponse non reconnue"
61;;
62esac
63
64
65
66echo "Mise a jour des droits sur les repertoires de donnees (IDRIS), presse entree"
67read pause
68
69
70ssh ${loginIDRIS}@jean-zay "setfacl -R -m u::rwx,u:rlmd007:rwx,u:rces009:rwx,u:rgzi017:rwx,u:rpsl003:rwx,u:rces333:rwx,u:rpsl500:rwx,u:rpsl592:rwx,u:rces981:rwx,u:rgzi002:rwx,u:rpsl951:rwx,u:rgzi023:rwx,u:rgzi028:rwx,u:rdzt910:rwx,u:romr009:rwx,u:rgzi026:rwx,u:rpsl655:rwx,u:rgzi016:rwx,u:rron171:rwx,u:udw66ox:rwx,g::r-x,o::r-x,m::rwx /gpfswork/rech/psl/commun/IGCM"
71
72
73
74echo "Mise a jour des droits sur les repertoires de donnees (TGCC) "
75ccc_shspace_chmod userread /ccc/work/cont003/igcmg/igcmg/IGCM
76is_problem=` ccc_shspace_modck IGCM |grep ccc_shspace_chmod |wc -l`
77if [ "x${is_problem}" != "x0" ] 
78then
79  echo "Il y a un probleme de droit sur un repertoire qui ne vous appartient pas"
80  echo "vous pouvez utiliser la commande ccc_shspace_modck IGCM pour savoir qui doit mettre a jour les droits"
81fi 
Note: See TracBrowser for help on using the repository browser.