diff --git a/manifests/script.pp b/manifests/script.pp index ef1dc5c..8923730 100644 --- a/manifests/script.pp +++ b/manifests/script.pp @@ -4,7 +4,7 @@ class sunetdrive::script ( $location = undef ) { include sunet::packages::python3_pip - include sunet::packages::kopia + include sunet::packages::yq $environment = sunetdrive::get_environment() $customer = sunetdrive::get_customer() $apikey_test = safe_hiera('monitor_apikey_test') diff --git a/templates/script/aggregate.sh b/templates/script/aggregate.sh index d5e8798..cfb9d09 100644 --- a/templates/script/aggregate.sh +++ b/templates/script/aggregate.sh @@ -9,16 +9,16 @@ aggregatefile="billing-$(date +%Y%m%d).csv" tempdir=$(mktemp -d) # Install yq if needed -yq="/usr/local/bin/yq" +yq="/usr/bin/yq" if ! [[ -x ${yq} ]]; then - pip3 install yq + apt install yq fi olddir=${PWD} cd "${tempdir}" || (echo "could not move to tempdir" && exit 1) # Make sure we have dir -rclone mkdir -p "${aggregatedir}" +rclone mkdir "${aggregatedir}" # Output headers csv="DATE:$(date +%F) TIME:$(date +%H:%M) Customer;Total GB;Users;Product"