Skip to content

Commit 0c701d0

Browse files
committed
Use consistent naming for installer script variables
1 parent 86d2b14 commit 0c701d0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

installer/installer.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ if [ ! -e /etc/spawnd/config.yml ]; then
106106
bw2Entity: {{entity}}
107107
path: {{path}}
108108
alias: {{alias}}
109-
memory: {{memAlloc}}
109+
memory: {{memory}}
110110
cpuShares: {{cpuShares}}
111111
bw2Agent: 172.17.0.1:28589
112112
EOF
113113

114114
entity=''
115115
path=''
116-
memAlloc=''
116+
memory=''
117117
cpuShares=''
118118
if [ -n "$SPAWND_INSTALLER_ENTITY" ]; then
119119
entity="$SPAWND_INSTALLER_ENTITY"
@@ -131,10 +131,10 @@ if [ ! -e /etc/spawnd/config.yml ]; then
131131
fi
132132
sdAlias="$(echo "$path" | awk -F'/' '{print $NF}')"
133133

134-
if [ -n "$SPAWND_INSTALLER_MEM_ALLOC" ]; then
135-
memAlloc="$SPAWND_INSTALLER_MEM_ALLOC"
134+
if [ -n "$SPAWND_INSTALLER_MEMORY" ]; then
135+
memory="$SPAWND_INSTALLER_MEMORY"
136136
else
137-
memAlloc="$(whiptail --nocancel --inputbox "Memory allocation for this Spawnpoint, in MiB (e.g. 2048):" \
137+
memory="$(whiptail --nocancel --inputbox "Memory allocation for this Spawnpoint, in MiB (e.g. 2048):" \
138138
10 78 --title "Memory Allocation" 3>&1 1>&2 2>&3)"
139139
fi
140140

@@ -151,7 +151,7 @@ if [ ! -e /etc/spawnd/config.yml ]; then
151151
$sh_c "sed -i 's#{{entity}}#/etc/spawnd/$entityFile#' /etc/spawnd/config.yml"
152152
$sh_c "sed -i 's#{{path}}#$path#' /etc/spawnd/config.yml"
153153
$sh_c "sed -i 's#{{alias}}#$sdAlias#' /etc/spawnd/config.yml"
154-
$sh_c "sed -i 's#{{memAlloc}}#$memAlloc#' /etc/spawnd/config.yml"
154+
$sh_c "sed -i 's#{{memory}}#$memory#' /etc/spawnd/config.yml"
155155
$sh_c "sed -i 's#{{cpuShares}}#$cpuShares#' /etc/spawnd/config.yml"
156156
$sh_c "chown spawnd:spawnd /etc/spawnd/config.yml"
157157

0 commit comments

Comments
 (0)