diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 709cf27c..7ce08c18 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -1218,16 +1218,8 @@ function image_setup_utils { } function image_install_nodejs { - if [ $INSTALLING_MESH ]; then - return - fi - - chroot "$rootdir" apt-get -yq install nodejs curl - - if [ ! -f $rootdir/usr/bin/nodejs ]; then - echo $'nodejs was not installed' - exit 63962 - fi + mesh_install_nodejs + echo 'install_nodejs' >> ${rootdir}/root/${PROJECT_NAME}-completed.txt } function image_preinstall_repos { diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index 880d9eb7..64681a74 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -45,11 +45,8 @@ NODEJS_INSTALLED_APPS_FILE=$HOME/.nodejs-apps function mesh_install_nodejs { # Note: this has to be jessie for now - if [ ! -d ${rootdir}/$INSTALL_DIR ]; then - mkdir ${rootdir}/$INSTALL_DIR - fi - chroot "${rootdir}" wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > $INSTALL_DIR/node.gpg.key - chroot "${rootdir}" apt-key add $INSTALL_DIR/node.gpg.key + wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > ${rootdir}/root/node.gpg.key + chroot "${rootdir}" apt-key add /root/node.gpg.key echo "deb https://deb.nodesource.com/node_7.x jessie main" > ${rootdir}/etc/apt/sources.list.d/nodesource.list echo "deb-src https://deb.nodesource.com/node_7.x jessie main" >> ${rootdir}/etc/apt/sources.list.d/nodesource.list chroot "${rootdir}" apt-get update @@ -151,12 +148,8 @@ function install_nodejs { fi # Note: this has to be jessie for now - if [ ! -d $INSTALL_DIR ]; then - mkdir $INSTALL_DIR - fi - cd $INSTALL_DIR - wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > $INSTALL_DIR/node.gpg.key - apt-key add $INSTALL_DIR/node.gpg.key + wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > /root/node.gpg.key + apt-key add /root/node.gpg.key echo "deb https://deb.nodesource.com/node_7.x jessie main" > /etc/apt/sources.list.d/nodesource.list echo "deb-src https://deb.nodesource.com/node_7.x jessie main" >> /etc/apt/sources.list.d/nodesource.list