From 9039a0f1b236ab6c7f96d4d133050add1df7b818 Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Mon, 30 Sep 2024 19:07:02 +0200 Subject: [PATCH] #4049 Warn when less then 8GB on BTCPay Install (#4754) * #4049 warn when less then 8GB on BTCPay Install --- home.admin/00settingsMenuServices.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/home.admin/00settingsMenuServices.sh b/home.admin/00settingsMenuServices.sh index a3819a156..8c74e9887 100755 --- a/home.admin/00settingsMenuServices.sh +++ b/home.admin/00settingsMenuServices.sh @@ -254,6 +254,17 @@ choice="off"; check=$(echo "${CHOICES}" | grep -c "pa") if [ ${check} -eq 1 ]; then choice="on"; fi if [ "${BTCPayServer}" != "${choice}" ]; then echo "BTCPayServer setting changed .." + + #4049 warn if system has less than 8GB RAM + ramGB=$(free -g | awk '/^Mem:/{print $2}') + if [ "${choice}" = "on" ] && [ ${ramGB} -lt 7 ]; then + whiptail --title "Your RaspiBlitz has less than the recommended 8GB of RAM to run BTCPayServer.\nDo you really want to proceed?" 10 50 --defaultno --yes-button "Continue" --no-button "Cancel" + if [ $? -eq 1 ]; then + # if user choosed CANCEL just null the choice + choice="" + fi + fi + # check if TOR is installed source /mnt/hdd/raspiblitz.conf if [ "${choice}" = "on" ] && [ "${runBehindTor}" = "off" ]; then