Browse Source

Merge branch 'next' of github.com:rtCamp/easyengine into next

bugfixes
harshadyeola 10 years ago
parent
commit
ebfdab230b
  1. 2
      bin/easyengine
  2. 2
      src/lib/ee_lib_ram.sh
  3. 4
      src/lib/ee_lib_swap.sh

2
bin/easyengine

@ -47,7 +47,7 @@ elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ]; then
if [ "$EE_SECOND" = "install" ]; then
# Detect RAM of system and initialize the variables.
ee_lib_ram
ee_lib_create_swap
ee_lib_swap
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ] || [ "$EE_THIRD" = "postfix" ] || [ "$EE_THIRD" = "adminer" ] || [ "$EE_THIRD" = "phpmyadmin" ] || [ "$EE_THIRD" = "wpcli" ] || [ "$EE_THIRD" = "utils" ]; then
if [ "$EE_THIRD" = "nginx" ] || [ "$EE_THIRD" = "php" ] || [ "$EE_THIRD" = "mysql" ]; then
# Setup NGINX/PHP repository

2
src/lib/ee_lib_ram.sh

@ -4,7 +4,7 @@ function ee_lib_ram()
{
# Detect RAM and SWAP of System
readonly EE_TOTAL_RAM=$(free -m | grep -i Mem | awk '{ print $2 }')
readonly EE_TOTAL_SWAP=$(free -m --si | grep -i Swap | awk '{ print $2 }')
readonly EE_TOTAL_SWAP=$(free -m | grep -i Swap | awk '{ print $2 }')
# RAM < 512MB
if [ $EE_TOTAL_RAM -le 512 ]; then

4
src/lib/ee_lib_create_swap.sh → src/lib/ee_lib_swap.sh

@ -1,6 +1,6 @@
# EasyEngine Swap creation
function ee_lib_create_swap()
function ee_lib_swap()
{
if [ $EE_TOTAL_RAM -le 512 ]; then
if [ $EE_TOTAL_SWAP -le $EE_SWAP ];then
@ -10,7 +10,7 @@ function ee_lib_create_swap()
# Location: /ee-swapfile
# Block Size: 1024
ee_lib_echo "Adding 1GB swapfile, please wait..."
dd if=/dev/zero of=/ee-swapfile bs=1024 count=1024k &>> $EE_COMMAND_LOG \
dd if=/dev/zero of=/ee-swapfile bs=1024 count=1048k &>> $EE_COMMAND_LOG \
|| ee_lib_error "Unable to generate /ee-swapfile, exit status = " $?
# Create it as a Swap
Loading…
Cancel
Save