add a preset, although it doesn't seem necessary
This commit is contained in:
parent
facf699c22
commit
f3cfa3a61d
@ -9,7 +9,7 @@ cd "${dir}"
|
||||
BINARY=$(curl https://api.github.com/repos/prometheus/node_exporter/releases/latest | jq -r '.assets[] | select(.name | contains("linux-amd64")) | .browser_download_url')
|
||||
curl -L $BINARY -o node-exporter.tgz
|
||||
|
||||
mkdir -p prometheus/usr/{bin,lib/{systemd/system,extension-release.d}}
|
||||
mkdir -p prometheus/usr/{bin,lib/{systemd/{system,system-preset},extension-release.d}}
|
||||
tar xzf node-exporter.tgz
|
||||
|
||||
cp -vrf node_exporter-*/node_exporter prometheus/usr/bin/node_exporter
|
||||
@ -31,6 +31,11 @@ ProtectSystem=strict
|
||||
WantedBy=multi-user.target
|
||||
EOM
|
||||
|
||||
cat > prometheus/usr/lib/systemd/system-preset/00-prometheus-node-exporter.preset <<- EOM
|
||||
# enabling prometheus
|
||||
enable prometheus-node-exporter.service
|
||||
EOM
|
||||
|
||||
source /etc/os-release
|
||||
echo -e "SYSEXT_LEVEL=1.0\nID=steamos\nVERSION_ID=${VERSION_ID}" >> prometheus/usr/lib/extension-release.d/extension-release.prometheus-node-exporter
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user