From fac9481d57ce19a07943c777a93bb21f1be8eff8 Mon Sep 17 00:00:00 2001 From: Doug Le Tough Date: Sun, 23 Jul 2017 08:13:02 +0200 Subject: [PATCH] "MaJ install.sh: Suppression ancien socle avant installation" --- bin/ctl_all_nrpe.sh | 6 +++--- bin/{ctl_check_process.sh => ctl_host_process.sh} | 4 ++-- install.sh | 9 +++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) rename bin/{ctl_check_process.sh => ctl_host_process.sh} (97%) diff --git a/bin/ctl_all_nrpe.sh b/bin/ctl_all_nrpe.sh index c9d3f0d..609c02c 100755 --- a/bin/ctl_all_nrpe.sh +++ b/bin/ctl_all_nrpe.sh @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------------------------------------------ -# Script : expl_check_all_nrpe.sh +# Script : ctl_all_nrpe.sh # Auteur : Doug Le Tough # Date : 23-07-2017 # Version : 1.0.0 @@ -47,10 +47,10 @@ ## Syntaxe : ## -------- ## -## prompt> expl_check_all_nrpe.sh +## prompt> ctl_all_nrpe.sh ## ## ex: -## expl_check_all_nrpe.sh +## ctl_all_nrpe.sh ## ## Prérequis: ## ---------- diff --git a/bin/ctl_check_process.sh b/bin/ctl_host_process.sh similarity index 97% rename from bin/ctl_check_process.sh rename to bin/ctl_host_process.sh index eaaf239..0acccae 100644 --- a/bin/ctl_check_process.sh +++ b/bin/ctl_host_process.sh @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------------------------------------------ -# Script : expl_check_all_nrpe.sh +# Script : ctl_host_process.sh # Auteur : Doug Le Tough # Date : 23-07-2017 # Version : 1.0.0 @@ -47,7 +47,7 @@ ## Syntaxe : ## -------- ## -## prompt> expl_check_all_nrpe.sh +## prompt> ctl_all_nrpe.sh ## ## ex: ## expl_check_all_nrpe.sh diff --git a/install.sh b/install.sh index 5578019..cc6e94e 100755 --- a/install.sh +++ b/install.sh @@ -50,13 +50,18 @@ fi source ${PKG_INSTALL_CONF} source ${PKG_SOCLE_INIT_CONF} 2>/dev/null - +echo -e "\033[93mSuppression de l'installation antérieure du socle Bash\033[0m" +sudo rm -Rf ${NC_EXPL_ROOT} +RET_VAL=$? +if [ ! ${RET_VAL} -eq 0 ]; then + exit_on_error "Erreur lors de la suppression du répertoire ${NC_EXPL_ROOT}" +fi echo -e "\033[93mInstallation du socle Bash:\033[0m" echo -e "\033[93m * Répertoire racine: ${NC_EXPL_ROOT}\033[0m" echo -e "\033[93m * Création des répertoires:\033[0m" # Création des répertoires de destination -for DIR in $NC_EXPL_LIB $NC_EXPL_BIN $NC_EXPL_LOG $NC_EXPL_HST $NC_EXPL_CPT $NC_EXPL_TMP $NC_EXPL_DAT $NC_EXPL_MOD $NC_EXPL_CFG $NC_EXPL_MSG $NC_EXPL_MAN; +for DIR in ${NC_EXPL_LIB} ${NC_EXPL_BIN} ${NC_EXPL_LOG} ${NC_EXPL_HST} ${NC_EXPL_CPT} ${NC_EXPL_TMP} ${NC_EXPL_DAT} ${NC_EXPL_MOD} ${NC_EXPL_CFG} ${NC_EXPL_MSG} ${NC_EXPL_MAN}; do echo -en " * ${DIR} " sudo mkdir -p ${DIR};