Commit 8586723e authored by Joshua Tauberer's avatar Joshua Tauberer

Merge pull request #168 from hjjg/feature-localehandling1

locale-safe check if we have enough memory installed
parents aa3bc322 3774f589
...@@ -19,8 +19,8 @@ fi ...@@ -19,8 +19,8 @@ fi
# Check that we have enough memory. Skip the check if we appear to be # Check that we have enough memory. Skip the check if we appear to be
# running inside of Vagrant, because that's really just for testing. # running inside of Vagrant, because that's really just for testing.
TOTAL_PHYSICAL_MEM=$(free -m | grep ^Mem: | sed "s/^Mem: *\([0-9]*\).*/\1/") TOTAL_PHYSICAL_MEM=$(head -n 1 /proc/meminfo | awk '{print $2}')
if [ $TOTAL_PHYSICAL_MEM -lt 768 ]; then if [ $TOTAL_PHYSICAL_MEM -lt 786432 ]; then
if [ ! -d /vagrant ]; then if [ ! -d /vagrant ]; then
echo "Your Mail-in-a-Box needs more than $TOTAL_PHYSICAL_MEM MB RAM." echo "Your Mail-in-a-Box needs more than $TOTAL_PHYSICAL_MEM MB RAM."
echo "Please provision a machine with at least 768 MB, 1 GB recommended." echo "Please provision a machine with at least 768 MB, 1 GB recommended."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment