--- misc/xoa-installer/xoa-installer.sh 2016/12/22 09:07:46 3179 +++ misc/xoa-installer/xoa-installer.sh 2016/12/22 12:43:51 3180 @@ -18,7 +18,6 @@ - function restartxo { killall -9 node rm -f /root/forever.log @@ -30,6 +29,15 @@ exit fi + +phymem=$(free -m|awk '/^Mem:/{print $2}') +swapmem=$(free -m|awk '/^Swap:/{print $2}') +total=$(expr $phymem + $swapmem) +if [ $total -le 1536 ] ; then + echo not enough memory: $total + exit +fi + if [ "$1" == "clean" ] ; then echo cleaning xo-web rm -rf xo-web @@ -113,7 +121,7 @@ if [ ! -d "/usr/local/lib/node_modules/bcrypt" ] ; then echo "installing bcrypt" - npm install -g bcrypt || exit + npm install -g --unsafe-perm bcrypt || exit fi if [ ! -d "xo-web" ] ; then