Variabilisation de l'emplacement du fichier creds et modification des chemins par défaut
This commit is contained in:
parent
94a34f110f
commit
436382bb54
|
@ -21,8 +21,9 @@ write_log() {
|
|||
}
|
||||
|
||||
# IPAM creds
|
||||
if [ -f ./creds ]; then
|
||||
. ./creds
|
||||
CREDS_FILE='/etc/creds'
|
||||
if [ -f $CREDS_FILE ]; then
|
||||
. $CREDS_FILE
|
||||
CURL='curl -s -k -sS'
|
||||
else
|
||||
write_log FATAL 'The file creds doesn’t exist'
|
||||
|
@ -42,7 +43,7 @@ if [ ! -z "${MISSING}" ]; then
|
|||
fi
|
||||
|
||||
# Chemin fichier de LOG (et création du répertoire s'il n'existe pas)
|
||||
LOG_PLACE='./vm_id_log/'
|
||||
LOG_PLACE='/var/local/log/vm_id_log/'
|
||||
if [ ! -d "${LOG_PLACE}" ];then
|
||||
mkdir -p ${LOG_PLACE}
|
||||
write_log INFO 'Creation of the log dir'
|
||||
|
@ -51,7 +52,7 @@ fi
|
|||
write_log INFO 'Beginning of the script execution'
|
||||
|
||||
# Chemin fichier de CACHE (et création du répertoire s'il n'existe pas)
|
||||
CHEMIN_CACHE='./vm_id_cache/'
|
||||
CHEMIN_CACHE='/var/local/cache/vm_id_cache/'
|
||||
if [ ! -d "${CHEMIN_CACHE}" ];then
|
||||
mkdir -p ${CHEMIN_CACHE}
|
||||
write_log INFO 'Creation of the cache dir'
|
||||
|
|
Loading…
Reference in a new issue