From 4c7d508635626106e4833055cb4ff3e52c92ea75 Mon Sep 17 00:00:00 2001 From: alarig Date: Mon, 21 Jan 2019 11:02:27 +0100 Subject: [PATCH] Seprate the creds from the script --- creationRoutesVM.sh | 11 ++++++++--- creds.example | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) mode change 100644 => 100755 creationRoutesVM.sh create mode 100644 creds.example diff --git a/creationRoutesVM.sh b/creationRoutesVM.sh old mode 100644 new mode 100755 index df871fa..c029dec --- a/creationRoutesVM.sh +++ b/creationRoutesVM.sh @@ -10,9 +10,14 @@ # - LOG_PLACE # - CHEMIN_CACHE -# Informations d'indentification IPAM -USER_IPAM="" -PASSWORD_IPAM="" +# IPAM creds +if [ -f creds ]; then + source creds +else + printf 'Can’t source "creds": file not found\n' +fi + +exit 0 # ID subnets IPAM V4 et V6 contenants les VMs ID_RANGES_V4=( "74" "181" ) diff --git a/creds.example b/creds.example new file mode 100644 index 0000000..4651c5c --- /dev/null +++ b/creds.example @@ -0,0 +1,3 @@ +# User and password to request a token on phpIPAM API +USER_IPAM='user' +PASSWORD_IPAM='passwd'