mirror of
https://github.com/unifi-utilities/unifios-utilities.git
synced 2024-08-30 18:32:21 +00:00
df2a0f9144
thanks @kb9gxk
11 lines
359 B
Bash
Executable File
11 lines
359 B
Bash
Executable File
#!/bin/bash
|
|
|
|
CONTAINER=node-exporter
|
|
|
|
# Starts a Prometheus node-exporter container that is deleted after it is stopped.
|
|
if podman container exists "${CONTAINER}"; then
|
|
podman start "${CONTAINER}"
|
|
else
|
|
podman run -d --rm --name "${CONTAINER}" --net="host" --pid="host" -v "/:/host:ro,rslave" quay.io/prometheus/node-exporter:latest --path.rootfs=/host
|
|
fi
|