diff --git a/CHANGES b/CHANGES index 96d49ef2d..194d35742 100644 --- a/CHANGES +++ b/CHANGES @@ -2070,4 +2070,6 @@ * dashboard: looks for search string in app title as well * Add vaapi caps for transcoding * Fix issue where the long mongodb database names where causing app indices of rocket.chat to overflow (> 127) +* Do not resize swap if swap file exists. This means that users can now control how swap is allocated on their own. + diff --git a/setup/start/cloudron-resize-fs.sh b/setup/start/cloudron-resize-fs.sh index 5081d955a..f9aeb398a 100755 --- a/setup/start/cloudron-resize-fs.sh +++ b/setup/start/cloudron-resize-fs.sh @@ -4,6 +4,11 @@ set -eu -o pipefail readonly APPS_SWAP_FILE="/apps.swap" +if [[ -f "${APPS_SWAP_FILE}" ]]; then + echo "Swap file already exists at /apps.swap . Skipping" + exit +fi + # all sizes are in mb readonly physical_memory=$(LC_ALL=C free -m | awk '/Mem:/ { print $2 }') readonly swap_size=$((${physical_memory} > 4096 ? 4096 : ${physical_memory})) # min(RAM, 4GB) if you change this, fix enoughResourcesAvailable() in client.js