6
0
Fork 0
This repository has been archived on 2022-03-14. You can view files and clone it, but cannot push or open issues or pull requests.
cdist-recycledcloud/type/__prometheus_yoctotemp_expo.../manifest

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