From 68d27d721408cd42e00f4ae6322fd86e439e0f3a Mon Sep 17 00:00:00 2001 From: bashrc Date: Wed, 25 Feb 2026 10:43:26 +0000 Subject: [PATCH] Improve getting of yggdrasil address --- deploy/yggdrasil | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deploy/yggdrasil b/deploy/yggdrasil index ae5c23f1a..988170994 100755 --- a/deploy/yggdrasil +++ b/deploy/yggdrasil @@ -89,8 +89,11 @@ fi echo 'Creating a command script to obtain yggdrasil address' { echo '#!/bin/bash'; - echo "echo -n '2'"; - echo "sudo yggdrasilctl getself | grep \"IPv6 address\" | awk -F ' 2' '{print \$2}'"; } > /usr/bin/yggdrasil-address + echo "address=\$(sudo yggdrasilctl getself | grep \"IPv6 address\" | awk -F ' ' '{print \$3}')"; + echo "if [[ "\${address}" == *':' ]]; then"; + echo " address=2\$(sudo yggdrasilctl getself | grep \"IPv6 address\" | awk -F ' 2' '{print \$2}' | awk -F ' ' '{print \$1}')"; + echo 'fi'; + echo "echo \${address}"; } > /usr/bin/yggdrasil-address chmod +x /usr/bin/yggdrasil-address echo 'Creating yggdrasil configuration'