@@ -44,7 +44,7 @@ function usage {
44
44
# Parse the command line options
45
45
#
46
46
executeIt=false
47
- while getopts " ehi:o:u:" opt; do
47
+ while getopts " ehi:o:u:d: " opt; do
48
48
case $opt in
49
49
i) valuesInputFile=" ${OPTARG} "
50
50
;;
@@ -77,7 +77,7 @@ if [ "${missingRequiredOption}" == "true" ]; then
77
77
usage 1
78
78
fi
79
79
80
- if [ -z " ${azureResourceUID} " ]; then
80
+ if [ -z " ${azureResourceUID} " ]; then
81
81
azureResourceUID=` date +%s`
82
82
fi
83
83
@@ -205,7 +205,7 @@ function createYamlFiles {
205
205
if [ -z ${domainInputFile} ]; then
206
206
domainInputFile=" ${dirCreateDomain} /create-domain-inputs.yaml"
207
207
fi
208
-
208
+
209
209
cp ${domainInputFile} ${domain1Output}
210
210
sed -i -e " s;^image\:.*;image\: ${weblogicDockerImage} ;g" ${domain1Output}
211
211
sed -i -e " s:#imagePullSecretName.*:imagePullSecretName\: ${imagePullSecretName} :g" ${domain1Output}
@@ -215,7 +215,7 @@ function createYamlFiles {
215
215
216
216
# Parse domain configuration yaml for usage in load balancer
217
217
exportValuesFile=$( mktemp /tmp/export-values-XXXXXXXXX.sh)
218
- tmpFile=$( mktemp /tmp/javaoptions_tmp-XXXXXXXXX.dat)
218
+ tmpFile=$( mktemp /tmp/javaoptions_tmp-XXXXXXXXX.dat)
219
219
parseYaml ${domain1Output} ${exportValuesFile}
220
220
if [ ! -f ${exportValuesFile} ]; then
221
221
echo Unable to locate the parsed output of ${domain1Output} .
@@ -227,7 +227,7 @@ function createYamlFiles {
227
227
cat ${exportValuesFile}
228
228
echo
229
229
# javaOptions may contain tokens that are not allowed in export command
230
- # we need to handle it differently.
230
+ # we need to handle it differently.
231
231
# we set the javaOptions variable that can be used later
232
232
tmpStr=` grep " javaOptions" ${exportValuesFile} `
233
233
javaOptions=${tmpStr// " javaOptions=" / }
@@ -240,7 +240,7 @@ function createYamlFiles {
240
240
# Generate the yaml to create load balancer for Administration Server.
241
241
echo Generating ${adminLbOutput}
242
242
243
- cp ${wlsLbInput} ${adminLbOutput}
243
+ cp ${wlsLbInput} ${adminLbOutput}
244
244
sed -i -e " s:%SELECTOR_SERVER_TYPE%:${selectorAdminServerName} :g" ${adminLbOutput}
245
245
sed -i -e " s:%DOMAIN_UID%:${domainUID} :g" ${adminLbOutput}
246
246
sed -i -e " s:%SERVER_PORT%:${adminPort} :g" ${adminLbOutput}
@@ -275,7 +275,7 @@ function createResourceGroup {
275
275
# Create a resource group
276
276
echo Check if ${azureResourceGroupName} exists
277
277
ret=$( az group exists --name ${azureResourceGroupName} )
278
- if [ $ret != false ]; then
278
+ if [ $ret != false ]; then
279
279
fail " ${azureResourceGroupName} exists, please change value of namePrefix to generate a new resource group name."
280
280
fi
281
281
@@ -287,7 +287,7 @@ function createAndConnectToAKSCluster {
287
287
# Create aks cluster
288
288
echo Check if ${aksClusterName} exists
289
289
ret=$( az aks list -g ${azureResourceGroupName} | grep " ${aksClusterName} " )
290
- if [ -n " $ret " ]; then
290
+ if [ -n " $ret " ]; then
291
291
fail " AKS instance with name ${aksClusterName} exists."
292
292
fi
293
293
@@ -313,7 +313,7 @@ function createFileShare {
313
313
echo Check if the storage account ${storageAccountName} exists.
314
314
ret=$( az storage account check-name --name ${storageAccountName} )
315
315
nameAvailable=$( echo " $ret " | grep " nameAvailable" | grep " false" )
316
- if [ -n " $nameAvailable " ]; then
316
+ if [ -n " $nameAvailable " ]; then
317
317
echo $ret
318
318
fail " Storage account ${aksClusterName} is unavaliable."
319
319
fi
@@ -332,7 +332,7 @@ function createFileShare {
332
332
# Create the file share
333
333
echo Check if file share exists
334
334
ret=$( az storage share exists --name ${azureStorageShareName} --account-name ${storageAccountName} --connection-string $azureStorageConnectionString | grep " exists" | grep false)
335
- if [ $ret == true ] ; then
335
+ if [[ " $ret " == " true" ]] ; then
336
336
fail " File share name ${azureStorageShareName} is unavaliable."
337
337
fi
338
338
@@ -508,7 +508,7 @@ createYamlFiles
508
508
# All done if the execute option is true
509
509
if [ " ${executeIt} " = true ]; then
510
510
511
- # Login Azure with service pricipal
511
+ # Login Azure with service principal
512
512
loginAzure
513
513
514
514
# Create resource group
0 commit comments