浏览代码

Etherpad needs quite a lot of RAM

Bob Mottram 7 年前
父节点
当前提交
96b4ad2f36
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7
    0
      src/freedombone-app-etherpad

+ 7
- 0
src/freedombone-app-etherpad 查看文件

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