Skip to content
Snippets Groups Projects
Commit adb03814 authored by Bob Mottram's avatar Bob Mottram
Browse files

Upgrade nodejs to the new LTS

parent 2c73ce77
No related branches found
No related tags found
No related merge requests found
...@@ -97,6 +97,7 @@ if [ -d "$PROJECT_DIR" ]; then ...@@ -97,6 +97,7 @@ if [ -d "$PROJECT_DIR" ]; then
fi fi
#rebuild_exim_with_socks #rebuild_exim_with_socks
nodejs_upgrade
apt-get -yq -t stretch-backports install certbot apt-get -yq -t stretch-backports install certbot
email_install_tls email_install_tls
email_disable_chunking email_disable_chunking
......
...@@ -35,9 +35,9 @@ VARIANTS='mesh' ...@@ -35,9 +35,9 @@ VARIANTS='mesh'
# change these versions at your peril. Things will often crash if you don't # change these versions at your peril. Things will often crash if you don't
# have specifically the correct versions # have specifically the correct versions
NODEJS_VERSION='6.11.4' NODEJS_VERSION='8.11.1'
NODEJS_N_VERSION='2.1.7' NODEJS_N_VERSION='2.1.7'
NPM_VERSION='4.0.5' NPM_VERSION='5.6.0'
# This file keeps track of the apps needing nodejs # This file keeps track of the apps needing nodejs
# so that it can be removed if tere are no apps which need it # so that it can be removed if tere are no apps which need it
...@@ -75,8 +75,8 @@ function mesh_install_nodejs { ...@@ -75,8 +75,8 @@ function mesh_install_nodejs {
exit 6389252 exit 6389252
fi fi
$mesh_install_nodejs_prefix apt-key add /root/node.gpg.key $mesh_install_nodejs_prefix apt-key add /root/node.gpg.key
echo "deb https://deb.nodesource.com/node_6.x stretch main" > "$rootdir/etc/apt/sources.list.d/nodesource.list" echo "deb https://deb.nodesource.com/node_8.x stretch main" > "$rootdir/etc/apt/sources.list.d/nodesource.list"
echo "deb-src https://deb.nodesource.com/node_6.x stretch main" >> "$rootdir/etc/apt/sources.list.d/nodesource.list" echo "deb-src https://deb.nodesource.com/node_8.x stretch main" >> "$rootdir/etc/apt/sources.list.d/nodesource.list"
$mesh_install_nodejs_prefix apt-mark -q unhold nodejs $mesh_install_nodejs_prefix apt-mark -q unhold nodejs
$mesh_install_nodejs_prefix apt-get update $mesh_install_nodejs_prefix apt-get update
...@@ -159,6 +159,17 @@ EOF ...@@ -159,6 +159,17 @@ EOF
rm "$rootdir/usr/bin/test_nodejs_install" rm "$rootdir/usr/bin/test_nodejs_install"
} }
function nodejs_upgrade {
if [ ! -f /etc/apt/sources.list.d/nodesource.list ]; then
return
fi
if grep -q "node_8.x" /etc/apt/sources.list.d/nodesource.list; then
return
fi
rootdir=
mesh_install_nodejs
}
function remove_nodejs { function remove_nodejs {
if [ ! "$1" ]; then if [ ! "$1" ]; then
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment