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
|
# IPAM creds
|
||||||
if [ -f ./creds ]; then
|
CREDS_FILE='/etc/creds'
|
||||||
. ./creds
|
if [ -f $CREDS_FILE ]; then
|
||||||
|
. $CREDS_FILE
|
||||||
CURL='curl -s -k -sS'
|
CURL='curl -s -k -sS'
|
||||||
else
|
else
|
||||||
write_log FATAL 'The file creds doesn’t exist'
|
write_log FATAL 'The file creds doesn’t exist'
|
||||||
|
@ -42,7 +43,7 @@ if [ ! -z "${MISSING}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Chemin fichier de LOG (et création du répertoire s'il n'existe pas)
|
# 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
|
if [ ! -d "${LOG_PLACE}" ];then
|
||||||
mkdir -p ${LOG_PLACE}
|
mkdir -p ${LOG_PLACE}
|
||||||
write_log INFO 'Creation of the log dir'
|
write_log INFO 'Creation of the log dir'
|
||||||
|
@ -51,7 +52,7 @@ fi
|
||||||
write_log INFO 'Beginning of the script execution'
|
write_log INFO 'Beginning of the script execution'
|
||||||
|
|
||||||
# Chemin fichier de CACHE (et création du répertoire s'il n'existe pas)
|
# 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
|
if [ ! -d "${CHEMIN_CACHE}" ];then
|
||||||
mkdir -p ${CHEMIN_CACHE}
|
mkdir -p ${CHEMIN_CACHE}
|
||||||
write_log INFO 'Creation of the cache dir'
|
write_log INFO 'Creation of the cache dir'
|
||||||
|
|
Loading…
Reference in a new issue