Upgrade nodejs to the new LTS
This commit is contained in:
parent
2c73ce7733
commit
adb038143d
|
@ -97,6 +97,7 @@ if [ -d "$PROJECT_DIR" ]; then
|
|||
fi
|
||||
|
||||
#rebuild_exim_with_socks
|
||||
nodejs_upgrade
|
||||
apt-get -yq -t stretch-backports install certbot
|
||||
email_install_tls
|
||||
email_disable_chunking
|
||||
|
|
|
@ -35,9 +35,9 @@ VARIANTS='mesh'
|
|||
|
||||
# change these versions at your peril. Things will often crash if you don't
|
||||
# have specifically the correct versions
|
||||
NODEJS_VERSION='6.11.4'
|
||||
NODEJS_VERSION='8.11.1'
|
||||
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
|
||||
# so that it can be removed if tere are no apps which need it
|
||||
|
@ -75,8 +75,8 @@ function mesh_install_nodejs {
|
|||
exit 6389252
|
||||
fi
|
||||
$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-src 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_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-get update
|
||||
|
@ -159,6 +159,17 @@ EOF
|
|||
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 {
|
||||
if [ ! "$1" ]; then
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue