setup-xoq.sh: strip CR char for podman compatibility

This commit is contained in:
Miraty 2025-01-20 17:27:09 +01:00
parent fbbaf1f31f
commit 9ecbd6f59d

View file

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