mirror of
https://github.com/Jarli01/xenorchestra_installer.git
synced 2024-11-23 12:30:45 +01:00
Switch to Node LTS (#69)
* Switch to Node LTS * Bump required memory to 3GB (build fails with only 2GB)
This commit is contained in:
parent
ef3929cbb3
commit
d15b30776a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user