aboutsummaryrefslogtreecommitdiff
path: root/scripts/upgrade
diff options
context:
space:
mode:
authormagikcypress <cyp@rouquin.me>2017-05-21 17:02:13 +0200
committermagikcypress <cyp@rouquin.me>2017-05-21 17:02:13 +0200
commit79f5e7d827a39c116522b5d57311962edb238f4c (patch)
treed5d56b47efe117bd0e13a6bf92887761cdb7ecc5 /scripts/upgrade
parentc7eb4ace251956c4ef69a3b4478c8611aab442fc (diff)
downloadmastodon_ynh-79f5e7d827a39c116522b5d57311962edb238f4c.tar.gz
mastodon_ynh-79f5e7d827a39c116522b5d57311962edb238f4c.tar.bz2
mastodon_ynh-79f5e7d827a39c116522b5d57311962edb238f4c.zip
[fix] upgrade ndeojs version
Diffstat (limited to 'scripts/upgrade')
-rw-r--r--scripts/upgrade8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/upgrade b/scripts/upgrade
index d217de6..4038fa7 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -40,6 +40,14 @@ sudo systemctl stop mastodon-*.service
# Change owner of live folder
sudo chown -R $app: $final_path/live
+# upgrade Node.js v4 to v6
+node_version=$(nodejs --version)
+if [[ $node_version =~ ^v4.*$ ]]; then
+ pushd /opt
+ curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
+ sudo apt-get -y install nodejs
+fi
+
# Download Mastodon
sudo su - $app <<PULLCOMMANDS
pushd ~/live