summaryrefslogtreecommitdiff
path: root/colocation-client.in
blob: dfb1662172d9dadc9835853d8e379bb94cd40e7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

configuration_file="${1:-#ETC#/colocation-client.conf}"

jq '{
  colocation_server,
  machine: .machines[]
} | {
  url: (
    .colocation_server +
    "update.php" +
    (
      "?machine=" +
      .machine.machine +
      "&key=" +
      .machine.key
    )
  ),
  values: .machine.values,
}' \
<"${configuration_file}"