"MaJ expl_transfert_dir.sh"
This commit is contained in:
		
							parent
							
								
									e9115caefc
								
							
						
					
					
						commit
						d770f09dac
					
				| @ -105,13 +105,27 @@ function check_hosts | |||||||
| function check_dirs | function check_dirs | ||||||
| { | { | ||||||
|   fct_message "Vérification du répertoire source ${src_dir} sur ${src_host}" -color jaune |   fct_message "Vérification du répertoire source ${src_dir} sur ${src_host}" -color jaune | ||||||
|   if [ $(ssh ${src_host} "sudo find ${ROOT_SRC_DIR} -maxdepth 1 -type d -name ${BASE_SRC_DIR} | wc -l") -eq 0 ]; then |   ssh ${src_host} "sudo find ${ROOT_SRC_DIR} -maxdepth 1 -type d -name ${BASE_SRC_DIR} >/dev/null 2>&1" | ||||||
|     ERROR="Le répoertoire ${src_host}:${src_dir} n'existe pas" |   RET_VAL=$? | ||||||
|  |   if [ ! ${RET_VAL} -eq 0 ]; then | ||||||
|  |     ERROR="Le répertoire ${src_host}:${src_dir} n'existe pas" | ||||||
|  |     fct_erreur 2 | ||||||
|  |   fi | ||||||
|  |   if [ $(ssh ${src_host} "sudo find ${ROOT_SRC_DIR} -maxdepth 1 -type d -name ${BASE_SRC_DIR}" | wc -l) -eq 0 ] || ; then | ||||||
|  |     ERROR="Le répertoire ${src_host}:${src_dir} n'existe pas" | ||||||
|  |     fct_erreur 2 | ||||||
|   fi |   fi | ||||||
|   if [ "${create}" != "true" ]; then |   if [ "${create}" != "true" ]; then | ||||||
|     fct_message "Vérification du répertoire destination ${dst_dir} sur ${dst_host}" -color jaune |     fct_message "Vérification du répertoire destination ${dst_dir} sur ${dst_host}" -color jaune | ||||||
|  |     ssh ${dst_host} "sudo find ${ROOT_DST_DIR} -maxdepth 1 -type d -name ${BASE_DST_DIR} >/dev/null 2>&1" | ||||||
|  |     RET_VAL=$? | ||||||
|  |     if [ ! ${RET_VAL} -eq 0 ]; then | ||||||
|  |       ERROR="Le répertoire ${src_host}:${src_dir} n'existe pas" | ||||||
|  |       fct_erreur 2 | ||||||
|  |     fi | ||||||
|     if [ $(ssh ${dst_host} "sudo find ${ROOT_DST_DIR} -maxdepth 1 -type d -name ${BASE_DST_DIR} | wc -l") -eq 0 ]; then |     if [ $(ssh ${dst_host} "sudo find ${ROOT_DST_DIR} -maxdepth 1 -type d -name ${BASE_DST_DIR} | wc -l") -eq 0 ]; then | ||||||
|       ERROR="Le répoertoire ${dst_host}:${dst_dir} n'existe pas" |       ERROR="Le répertoire ${dst_host}:${dst_dir} n'existe pas" | ||||||
|  |       fct_erreur 2 | ||||||
|     fi |     fi | ||||||
|   fi |   fi | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user