diff --git a/RUNTIME/PLAYER.refresh.sh b/RUNTIME/PLAYER.refresh.sh index 7f1038ec..eec16da5 100755 --- a/RUNTIME/PLAYER.refresh.sh +++ b/RUNTIME/PLAYER.refresh.sh @@ -469,9 +469,9 @@ for PLAYER in ${PLAYERONE[@]}; do ########################### - #### SEND TODAY UPlanetDAY${days} ZINE - ZINE2="${MY_PATH}/../templates/UPlanetDAY${days}/index.${lang}.html" - [[ ! -s ${ZINE2} ]] && ZINE2="${MY_PATH}/../templates/UPlanetDAY${days}/index.html" + #### SEND TODAY UPlanetZINE/day${days} ZINE + ZINE2="${MY_PATH}/../templates/UPlanetZINE/day${days}/index.${lang}.html" + [[ ! -s ${ZINE2} ]] && ZINE2="${MY_PATH}/../templates/UPlanetZINE/day${days}/index.html" [[ -s ${ZINE2} ]] \ && echo "SENDING ZINE2 DAY ${days} + mailjet TW import " \ && ${MY_PATH}/../tools/mailjet.sh "${PLAYER}" ${ZINE2} "ZINE #${days}" "${HOME}/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html" \ diff --git a/RUNTIME/VISA.new.sh b/RUNTIME/VISA.new.sh index 4eab9e15..5430cfb0 100755 --- a/RUNTIME/VISA.new.sh +++ b/RUNTIME/VISA.new.sh @@ -546,9 +546,9 @@ done # Print the result with leading space removed echo -e "${ipns2did:1}" ####################################################### EMAIL -[[ -s ${MY_PATH}/../templates/UPlanetZine/index.${LANG}.html ]] \ - && ZINE="${MY_PATH}/../templates/UPlanetZine/index.${LANG}.html" \ - || ZINE="${MY_PATH}/../templates/UPlanetZine/index.html" +[[ -s ${MY_PATH}/../templates/UPlanetZINE/day0/index.${LANG}.html ]] \ + && ZINE="${MY_PATH}/../templates/UPlanetZINE/day0/index.${LANG}.html" \ + || ZINE="${MY_PATH}/../templates/UPlanetZINE/day0/index.html" ##UPlanetZine::/ipfs/QmUjgQYK74UgRoyLFfmR2LMX7rd6vNxmtWeUtRxjemELuZ - chained release - cat ${ZINE} \ | sed -e "s~/ipfs/QmdmeZhD8ncBFptmD5VSJoszmu41edtT265Xq3HVh8PhZP~${ASTROQR}~g" \ diff --git a/install.prometheus_node_exporter_linux.sh b/install.prometheus_node_exporter_linux.sh new file mode 100644 index 00000000..895de8c5 --- /dev/null +++ b/install.prometheus_node_exporter_linux.sh @@ -0,0 +1,81 @@ +#!/bin/bash +[ $(id -u) -eq 0 ] && echo "LANCEMENT root INTERDIT. Utilisez un simple utilisateur du groupe \"sudo\" SVP" && exit 1 +## INSTALL NODE MONITORING TOOLS +#~ prometheus & grafana + +mkdir -p ~/.zen/tmp +cd ~/.zen/tmp + +# Check processor architecture +architecture=$(uname -m) + +###################################################### +## IF $1 == "GRAFANA" +###################################################### +if [[ "$1" == "GRAFANA" && ! -d ~/.zen/prometheus ]]; then + # Grafana + sudo apt-get install -y adduser libfontconfig1 musl + + [ "$architecture" == "x86_64" ] \ + && wget https://dl.grafana.com/oss/release/grafana_10.4.2_amd64.deb \ + && sudo dpkg -i grafana_10.4.2_amd64.deb + + [ "$architecture" == "aarch64" ] \ + && wget https://dl.grafana.com/oss/release/grafana_10.4.2_arm64.deb \ + && sudo dpkg -i grafana_10.4.2_arm64.deb + + +### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd + sudo systemctl daemon-reload + sudo systemctl enable grafana-server +### You can start grafana-server by executing + sudo systemctl start grafana-server + + + ## PROMETHEUS GATEWAY + [ "$architecture" == "x86_64" ] \ + && wget -O prometheus.tar.gz https://github.com/prometheus/prometheus/releases/download/v2.45.4/prometheus-2.45.4.linux-amd64.tar.gz + [ "$architecture" == "aarch64" ] \ + && wget -O prometheus.tar.gz https://github.com/prometheus/prometheus/releases/download/v2.45.4/prometheus-2.45.4.linux-arm64.tar.gz + + tar -xvzf prometheus.tar.gz + mv $(ls -d prometheus-*) ~/.zen/prometheus + +fi + +###################################################### +## PROMETHEUS node_exporter +###################################################### +# Download appropriate version of node_exporter +if [ "$architecture" == "x86_64" ]; then + wget --no-check-certificate -O node_exporter.tar.gz https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-amd64.tar.gz + # /ipfs/QmRDwRWPpfK1XmXQew8HgoqJgC9X5WXR2Qr82sg4MqJ4M7 +elif [ "$architecture" == "aarch64" ]; then + wget --no-check-certificate -O node_exporter.tar.gz https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-arm64.tar.gz + # /ipfs/QmQ8YukwTjUrTbibAWq8sR4c29ye33GX8v4T4GW1C1vDCk +elif [ "$architecture" == "armv7l" ]; then + wget --no-check-certificate -O node_exporter.tar.gz https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-armv7.tar.gz +elif [ "$architecture" == "armv6l" ]; then + wget --no-check-certificate -O node_exporter.tar.gz https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-armv6.tar.gz +else + echo "Error: Unknown architecture" + exit 1 +fi + +tar -xvzf node_exporter.tar.gz + +cd $(ls -d node_exporter-*) + +# Install +sudo cp node_exporter /usr/local/bin/ +cd .. + +# Test +[[ ! $(ls /usr/local/bin/node_exporter) ]] \ +&& echo "node_exporter NOT installed" && exit 1 \ +|| echo "node_exporter installed" + + + + +exit 0 diff --git a/templates/UPlanetZine/index.en.html b/templates/UPlanetZINE/day0/index.en.html similarity index 100% rename from templates/UPlanetZine/index.en.html rename to templates/UPlanetZINE/day0/index.en.html diff --git a/templates/UPlanetZine/index.es.html b/templates/UPlanetZINE/day0/index.es.html similarity index 100% rename from templates/UPlanetZine/index.es.html rename to templates/UPlanetZINE/day0/index.es.html diff --git a/templates/UPlanetZine/index.fr.html b/templates/UPlanetZINE/day0/index.fr.html similarity index 100% rename from templates/UPlanetZine/index.fr.html rename to templates/UPlanetZINE/day0/index.fr.html diff --git a/templates/UPlanetZine/index.html b/templates/UPlanetZINE/day0/index.html similarity index 100% rename from templates/UPlanetZine/index.html rename to templates/UPlanetZINE/day0/index.html diff --git a/templates/UPlanetDAY2/script.js b/templates/UPlanetZINE/day0/script.js similarity index 100% rename from templates/UPlanetDAY2/script.js rename to templates/UPlanetZINE/day0/script.js diff --git a/templates/UPlanetDAY2/style.css b/templates/UPlanetZINE/day0/style.css similarity index 100% rename from templates/UPlanetDAY2/style.css rename to templates/UPlanetZINE/day0/style.css diff --git a/templates/UPlanetDAY2/index.en.html b/templates/UPlanetZINE/day2/index.en.html similarity index 100% rename from templates/UPlanetDAY2/index.en.html rename to templates/UPlanetZINE/day2/index.en.html diff --git a/templates/UPlanetDAY2/index.fr.html b/templates/UPlanetZINE/day2/index.fr.html similarity index 100% rename from templates/UPlanetDAY2/index.fr.html rename to templates/UPlanetZINE/day2/index.fr.html diff --git a/templates/UPlanetDAY2/index.html b/templates/UPlanetZINE/day2/index.html similarity index 100% rename from templates/UPlanetDAY2/index.html rename to templates/UPlanetZINE/day2/index.html diff --git a/templates/UPlanetDAY3/script.js b/templates/UPlanetZINE/day2/script.js similarity index 100% rename from templates/UPlanetDAY3/script.js rename to templates/UPlanetZINE/day2/script.js diff --git a/templates/UPlanetDAY3/style.css b/templates/UPlanetZINE/day2/style.css similarity index 100% rename from templates/UPlanetDAY3/style.css rename to templates/UPlanetZINE/day2/style.css diff --git a/templates/UPlanetDAY3/index.html b/templates/UPlanetZINE/day3/index.html similarity index 100% rename from templates/UPlanetDAY3/index.html rename to templates/UPlanetZINE/day3/index.html diff --git a/templates/UPlanetZine/script.js b/templates/UPlanetZINE/day3/script.js similarity index 100% rename from templates/UPlanetZine/script.js rename to templates/UPlanetZINE/day3/script.js diff --git a/templates/UPlanetZine/style.css b/templates/UPlanetZINE/day3/style.css similarity index 100% rename from templates/UPlanetZine/style.css rename to templates/UPlanetZINE/day3/style.css diff --git a/templates/UPlanetDAY5/index.html b/templates/UPlanetZINE/day5/index.html similarity index 100% rename from templates/UPlanetDAY5/index.html rename to templates/UPlanetZINE/day5/index.html