From 037fc34d5621d5c4ddf676c39712d19fb09fb612 Mon Sep 17 00:00:00 2001 From: Leopold Schabel Date: Sun, 14 Feb 2021 14:56:22 +0100 Subject: [PATCH] Update README.md --- README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b029ee0..ff28c58 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,23 @@ Docker images are available on [Docker Hub](https://hub.docker.com/r/certusone/near_exporter). -Go is required to build the binary. +Go >= 1.14 is required to build the binary. + +### How to build -***Build the binary:*** ``` go build github.com/certusone/near_exporter/cmd/near_exporter ``` -***Systemd service example*** +### systemd service example + ``` cp near_exporter /usr/local/bin -vi /etc/systemd/system/near-exporter.service - -#Add this content to the file: - +cat < /etc/systemd/system/near-exporter.service [Unit] -Description=near-exporter +Description=Certus One near_exporter +Documentation=https://github.com/certusone/near_exporter After=network.target [Service] @@ -29,8 +29,12 @@ RestartSec=10s [Install] WantedBy=multi-user.target +EOF +``` +Enable and start the service: +``` systemctl enable --now near-exporter ```