24 lines
576 B
Bash
24 lines
576 B
Bash
#!/bin/sh
|
|
|
|
os=$(cat "${__global:?}/explorer/os")
|
|
case "$os" in
|
|
debian|ubuntu)
|
|
__package python3-virtualenv
|
|
__package virtualenv
|
|
__package curl
|
|
;;
|
|
*)
|
|
echo "$os is not supported by this type. Exiting" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
__directory /opt/prometheus-yoctotemp-exporter
|
|
|
|
# Make sure the prometheus user exist and belongs to dialout.
|
|
__user prometheus
|
|
require="__user/prometheus" __user_groups prometheus --group dialout
|
|
__systemd_unit prometheus-yoctotemp-exporter.service \
|
|
--source "$__type/files/prometheus-yoctotemp-exporter.service" \
|
|
--enablement-state enabled
|