Sfoglia il codice sorgente

Etherpad needs quite a lot of RAM

Bob Mottram 7 anni fa
parent
commit
96b4ad2f36
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7
    0
      src/freedombone-app-etherpad

+ 7
- 0
src/freedombone-app-etherpad Vedi File

@@ -444,6 +444,13 @@ function install_etherpad {
444 444
         exit 7359
445 445
     fi
446 446
 
447
+    # Check the amount of RAM
448
+    ram_available=$(grep MemTotal /proc/meminfo | awk '{print $2}')
449
+    if [ $ram_available -lt 2000000 ]; then
450
+        echo $'Need at least 2GB RAM to install etherpad'
451
+        exit 783524
452
+    fi
453
+
447 454
     if [ -f $IMAGE_PASSWORD_FILE ]; then
448 455
         ETHERPAD_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
449 456
     else