#!/usr/bin/env bash DOWNLOAD_URL="https://github.com/prometheus/blackbox_exporter/releases/download/v0.25.0/blackbox_exporter-0.25.0.linux-amd64.tar.gz" wget "${DOWNLOAD_URL}" -O "blackbox.tar.gz" tar xvf blackbox.tar.gz cd blackbox_exporter-*linux-amd64 mv blackbox_exporter /usr/local/bin mkdir -p /etc/blackbox mv blackbox.yml /etc/blackbox cd - useradd -rs /bin/false blackbox chown blackbox:blackbox /usr/local/bin/blackbox_exporter chown -R blackbox:blackbox /etc/blackbox/* cat >/etc/systemd/system/blackbox.service <