blob: 4930c94a4e4d30ff64f7ad7d23a5c29b6450a868 (
plain) (
tree)
|
|
local configuration_file_name='config'
info 'Getting configuration file.'
local IFS_backup="$IFS"
IFS=","
local host
for host in ${SLX_SERVER}; do
info "Trying host \"$host\"."
wget --timeout 5 --quiet "http://${host}/${SLX_SERVER_BASE}${configuration_file_name}" \
--output-document "/$configuration_file_name"
local return_code="$?"
[[ $return_code == 0 ]] && break
continue
done
IFS="$IFS_backup"
if [[ $return_code != 0 ]]; then
warn "Downloading OpenSLX configuration file from any of the servers \"${SLX_SERVER}\" at location \"${SLX_SERVER_BASE}${configuration_file_name}\" failed. Return code: $return_code"
emergency_shell -n "$0"
return 1
fi
source "/$configuration_file_name"
mkdir --parents "$SLX_CONFIGURATION_LOCATION"
mv "/$configuration_file_name" "$SLX_CONFIGURATION_LOCATION"
|