forked from clan/clan-core
installer: fix qr code again
This commit is contained in:
parent
7a74c86c70
commit
3c02453705
@ -47,7 +47,7 @@
|
|||||||
--arg password "$(cat /var/shared/root-password)" \
|
--arg password "$(cat /var/shared/root-password)" \
|
||||||
--arg onion_address "$(cat /var/shared/onion-hostname)" \
|
--arg onion_address "$(cat /var/shared/onion-hostname)" \
|
||||||
--argjson local_addrs "$local_addrs" \
|
--argjson local_addrs "$local_addrs" \
|
||||||
'{ pass: $password, onion_address: $onion_address, local_addrs: $local_addrs }' \
|
'{ pass: $password, onion_address: $onion_address, addrs: $local_addrs }' \
|
||||||
> /var/shared/login.json
|
> /var/shared/login.json
|
||||||
cat /var/shared/login.json | qrencode -t utf8 -o /var/shared/qrcode.utf8
|
cat /var/shared/login.json | qrencode -t utf8 -o /var/shared/qrcode.utf8
|
||||||
'';
|
'';
|
||||||
|
@ -85,7 +85,7 @@ def is_reachable(host: str) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def connect_ssh_from_json(ssh_data: dict[str, str]) -> None:
|
def connect_ssh_from_json(ssh_data: dict[str, str]) -> None:
|
||||||
for address in ssh_data["local_addrs"]:
|
for address in ssh_data["addrs"]:
|
||||||
log.debug(f"Trying to reach host on: {address}")
|
log.debug(f"Trying to reach host on: {address}")
|
||||||
if is_reachable(address):
|
if is_reachable(address):
|
||||||
ssh(host=address, password=ssh_data["pass"])
|
ssh(host=address, password=ssh_data["pass"])
|
||||||
|
Loading…
Reference in New Issue
Block a user