Actualiser run.sh
ajout du contrôle pour voir si jq est installé Signed-off-by: thomas <contact@thomasmlg.fr>
This commit is contained in:
22
run.sh
22
run.sh
@@ -24,6 +24,28 @@ log() {
|
||||
echo "$1" >>"$RUN_LOG_ARCHIVE"
|
||||
}
|
||||
|
||||
ensure_jq() {
|
||||
if command -v jq >/dev/null 2>&1; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "📦 Installation de jq..."
|
||||
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
apt-get update >>"$RUN_LOG" 2>&1
|
||||
apt-get install -y jq >>"$RUN_LOG" 2>&1
|
||||
return 0
|
||||
fi
|
||||
|
||||
if command -v apk >/dev/null 2>&1; then
|
||||
apk add --no-cache jq >>"$RUN_LOG" 2>&1
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "❌ Impossible d'installer jq automatiquement"
|
||||
return 1
|
||||
}
|
||||
|
||||
send_matrix() {
|
||||
local message="$1"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user