Switch to Node LTS (#69)

* Switch to Node LTS
* Bump required memory to 3GB (build fails with only 2GB)
This commit is contained in:
Danp2 2020-04-04 09:48:29 -05:00 committed by GitHub
parent ef3929cbb3
commit d15b30776a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -3,16 +3,16 @@
# Check if we were effectively run as root
[ $EUID = 0 ] || { echo "This script needs to be run as root!"; exit 1; }
# Check for 1GB Memory
# Check for required memory
totalk=$(awk '/^MemTotal:/{print $2}' /proc/meminfo)
if [ "$totalk" -lt "1000000" ]; then echo "XOCE Requires at least 1GB Memory!"; exit 1; fi
if [ "$totalk" -lt "3000000" ]; then echo "XOCE Requires at least 3GB Memory!"; exit 1; fi
distro=$(/usr/bin/lsb_release -is)
if [ "$distro" = "Ubuntu" ]; then /usr/bin/add-apt-repository multiverse; fi
xo_branch="master"
xo_server="https://github.com/vatesfr/xen-orchestra"
n_repo="https://raw.githubusercontent.com/visionmedia/n/master/bin/n"
n_repo="https://raw.githubusercontent.com/tj/n/master/bin/n"
yarn_repo="deb https://dl.yarnpkg.com/debian/ stable main"
yarn_gpg="https://dl.yarnpkg.com/debian/pubkey.gpg"
n_location="/usr/local/bin/n"
@ -27,7 +27,6 @@ xo_service="xo-server.service"
#Install yarn
cd /opt
/usr/bin/curl -sS $yarn_gpg | apt-key add -
echo "$yarn_repo" | tee /etc/apt/sources.list.d/yarn.list
/usr/bin/apt-get update
@ -38,7 +37,7 @@ echo "$yarn_repo" | tee /etc/apt/sources.list.d/yarn.list
/bin/chmod +x $n_location
# Install node via n
n 8.16
n lts
# Symlink node directories
ln -s /usr/bin/node /usr/local/bin/node