servnest-containers/setup-xoq.sh
2025-01-22 19:15:17 +01:00

13 lines
1,018 B
Bash
Executable file

#!/usr/bin/env sh
ENGINE="podman" # "podman" or "docker"
$ENGINE-compose --profile=secondary exec knot-secondary knotc conf-begin
$ENGINE-compose --profile=secondary exec knot-secondary knotc conf-unset remote[primary].cert-key
$ENGINE-compose --profile=secondary exec knot-secondary knotc conf-set remote[primary].cert-key "$($ENGINE-compose --profile=secondary exec knot cat /var/log/knot/knot.log | grep "certificate public key" | cut -d " " -f 7 | tail -1 | tr -d "\r")"
$ENGINE-compose --profile=secondary exec knot-secondary knotc conf-commit
$ENGINE-compose --profile=secondary exec knot knotc conf-begin
$ENGINE-compose --profile=secondary exec knot knotc conf-unset remote[secondary].cert-key
$ENGINE-compose --profile=secondary exec knot knotc conf-set remote[secondary].cert-key "$($ENGINE-compose --profile=secondary exec knot-secondary cat /var/log/knot/knot.log | grep "certificate public key" | cut -d " " -f 7 | tail -1 | tr -d "\r")"
$ENGINE-compose --profile=secondary exec knot knotc conf-commit