From bd936220158b549ff4439e092b3781355c5ea7d2 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 8 Dec 2018 16:22:41 +0100 Subject: [PATCH] install.sh: adding some output. --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index dab7541..020b6c7 100755 --- a/install.sh +++ b/install.sh @@ -8,17 +8,21 @@ CONFIGDIR=/etc/prometheus SRC_URL=https://github.com/prometheus/haproxy_exporter/releases/download/v${VERSION}/haproxy_exporter-${VERSION}.linux-${ARCH}.tar.gz # Download and install the binary. +echo " - Download source from: ${SRC_URL}" wget -q --show-progress -O- ${SRC_URL} | tar zxf - sudo mv haproxy_exporter-${VERSION}.linux-${ARCH}/haproxy_exporter ${INSTALLDIR}/haproxy_exporter-${VERSION} # Create User/Group +echo " - Adding user: haproxy_exporter" sudo useradd -M -s /bin/false haproxy_exporter # Write config +echo " - Write config: ${CONFIGDIR}/haproxy_exporter.conf" sudo mkdir -p ${CONFIGDIR} sudo cp ./haproxy_exporter.conf ${CONFIGDIR}/ # Write system service file. +echo " - Write systemd service file: /etc/systemd/system/haproxy_exporter.service" echo "[Unit] Description=HAProxy Prometheus Exporter Wants=network-online.target @@ -33,3 +37,5 @@ ExecStart=/usr/local/bin/haproxy_exporter-${VERSION} \$HAPROXY_EXPORTER_OPTS [Install] WantedBy=multi-user.target" | sudo tee /etc/systemd/system/haproxy_exporter.service > /dev/null + +echo " - Done"