#4049 Warn when less then 8GB on BTCPay Install (#4754)

* #4049 warn when less then 8GB on BTCPay Install
This commit is contained in:
/rootzoll 2024-09-30 19:07:02 +02:00 committed by GitHub
parent 1dba2f5c36
commit 9039a0f1b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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