Add dialog to set maxmemory when creating instance
This commit is contained in:
parent
9ffc0e0787
commit
5dfcf87ce4
1 changed files with 14 additions and 1 deletions
|
@ -10,6 +10,7 @@ function populateConfig() {
|
|||
local software_url
|
||||
local release
|
||||
local version
|
||||
local maxMemory
|
||||
|
||||
# software
|
||||
log i "What would you like to install?"
|
||||
|
@ -107,7 +108,19 @@ function populateConfig() {
|
|||
;;
|
||||
esac
|
||||
|
||||
jq "(.type=\"${runnertype}\")|(.build=${build})|(.software=\"${software}\")|(.release=\"${release}\")|(.version=\"${version}\")|(.podman_network=\"${network_name}\")" ${TEMPLATEDIR}/config.json > "${config}"
|
||||
# maxMemory
|
||||
log i "How much memory (in MiB) do you want to allocate?"
|
||||
while [[ -z ${maxMemoryAns} ]]; do
|
||||
read -p "Answer: " maxMemoryAns
|
||||
if [[ ${maxMemoryAns} -lt 2048 ]]; then
|
||||
log e "max memory allocation can't be below 2048 MiB"
|
||||
unset maxMemoryAns
|
||||
else
|
||||
maxMemory="${maxMemoryAns}"
|
||||
fi
|
||||
done
|
||||
|
||||
jq "(.type=\"${runnertype}\")|(.build=${build})|(.software=\"${software}\")|(.release=\"${release}\")|(.version=\"${version}\")|(.maxMemory=${maxMemory})|(.podman_network=\"${network_name}\")" ${TEMPLATEDIR}/config.json > "${config}"
|
||||
}
|
||||
|
||||
function checkBackupDir() {
|
||||
|
|
Loading…
Reference in a new issue