UPlanet ZINE - a Web3 journal to print, cut, fold, share... make knowledge a common good
This commit is contained in:
parent
b331dcc990
commit
1d4527c72e
|
@ -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" \
|
||||
|
|
|
@ -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" \
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue