mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-23 13:58:09 -05:00
Warn during installation if total memory is below 2GB
This commit is contained in:
@@ -82,6 +82,15 @@ if [ "$DISTRIB_ID" != "Ubuntu" -o "$DISTRIB_RELEASE" != "12.04" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "2000000" -gt $(awk '/MemTotal/{print $2}' /proc/meminfo) ]]; then
|
||||
LOW_MEM_PROMPT="reddit requires at least 2GB of memory to work properly, continue anyway? [y/n] "
|
||||
read -er -n1 -p "$LOW_MEM_PROMPT" response
|
||||
if [[ "$response" != "y" ]]; then
|
||||
echo "Quitting."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
# Install prerequisites
|
||||
###############################################################################
|
||||
|
||||
Reference in New Issue
Block a user