Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit fd381509 authored by Antoine Blanquet's avatar Antoine Blanquet
Browse files

fix installations npm missings

parent 953bd581
......@@ -90,10 +90,22 @@ echo "Passive Active Check"
# Installation
if ! [ -x "$(command -v phantomjs)" ]; then
echo "Missings libs to generate sparkline as a png image. Check out README.md of reports"
echo "We are skipping the generation of the picture."
else
# Generate an image of the page html with sparkline
node generate_sparkline_image.js
echo 'phantomjs is not installed. Installing phantomjs ...'
sudo apt-get install -y phantomjs
fi
package='graceful-js'
if [ `npm list -g | grep -c $package` -eq 0 ]; then
echo 'graceful-js is not installed. Installing graceful-js ...'
npm install "webshot"
npm install $package
fi
package='graceful-js'
if [ `npm list -g | grep -c $package` -eq 0 ]; then
echo 'graceful-js is not installed. Installing graceful-js ...'
npm install $package
fi
# Generate an image of the page html with sparkline
node generate_sparkline_image.js
......@@ -11,7 +11,12 @@
# Bug:
# -------------------------------------------------
#!/bin/bash
# Installation
package='moment'
if [ `npm list -g | grep -c $package` -eq 0 ]; then
echo 'momentjs is not installed. Installing momentjs ...'
npm install $package
fi
TODAY="$(date +"%Y-%m-%d")"
......
......@@ -11,7 +11,12 @@
# Bug:
# -------------------------------------------------
# Installation
package='moment'
if [ `npm list -g | grep -c $package` -eq 0 ]; then
echo 'momentjs is not installed. Installing momentjs ...'
npm install $package
fi
TODAY="$(date +"%Y-%m-%d")"
......
......@@ -36,7 +36,7 @@ ATTACHMENT="../images/operators.png"
mail -a "$CONTENT_TYPE_HTML" -s "$SUBJECT" -u monitoring $TO < ${devices_html}
if ! [ -f "${devices_html}" ]; then
# if there was a problem during the installation of npm when generating the screenshot, we generate gateways email without the attachment.
# if there was a problem when generating the screenshot and this one doesn't exists, we generate gateways email without the attachment.
mail -a "$CONTENT_TYPE" -s "$SUBJECT" -u monitoring $TO <${gateways_without_spark_html}
else
# we generate email gateways with an attachment.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment