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

npm path

parent e3e4b1f7
No related branches found
No related tags found
No related merge requests found
......@@ -94,14 +94,14 @@ function install_peertube_base {
cd ${PEERTUBE_DIR}/peertube-latest || exit 35685
chown -R peertube:peertube $PEERTUBE_DIR
sudo -H -u peertube npm install npm@5.8.0
sudo -H -u peertube npm install npm@6
sudo -H -u peertube npm install yarn@1.10.1
if [ ! -f "${PEERTUBE_DIR}/.bashrc" ]; then
echo "PATH=${PEERTUBE_DIR}/peertube-latest/node_modules/.bin:${PEERTUBE_DIR}/peertube-latest/node_modules/yarn/bin:${PEERTUBE_DIR}/peertube-latest/node_modules/npm/bin:\$PATH" > "${PEERTUBE_DIR}/.bashrc"
echo "PATH=/root/.npm-global/bin:$PATH" > "${PEERTUBE_DIR}/.bashrc"
else
if ! grep -q "PATH=${PEERTUBE_DIR}" "${PEERTUBE_DIR}/.bashrc"; then
echo "PATH=${PEERTUBE_DIR}/peertube-latest/node_modules/.bin:${PEERTUBE_DIR}/peertube-latest/node_modules/yarn/bin:${PEERTUBE_DIR}/peertube-latest/node_modules/npm/bin:\$PATH" >> "${PEERTUBE_DIR}/.bashrc"
if ! grep -q "npm-global" "${PEERTUBE_DIR}/.bashrc"; then
echo "PATH=/root/.npm-global/bin:$PATH" >> "${PEERTUBE_DIR}/.bashrc"
fi
fi
chown peertube:peertube "${PEERTUBE_DIR}/.bashrc"
......@@ -1122,7 +1122,6 @@ function install_peertube {
cp "$PEERTUBE_DIR/peertube-latest/support/systemd/peertube.service" /etc/systemd/system/peertube.service
sed -i "s|/var/www/peertube|$PEERTUBE_DIR|g" /etc/systemd/system/peertube.service
sed -i "s|ExecStart=.*|ExecStart=$PEERTUBE_DIR/peertube-latest/node_modules/.bin/npm start|g" /etc/systemd/system/peertube.service
peertube_create_config
......
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