2024-05-30 02:35:16 +02:00
|
|
|
#!/usr/bin/env bash
|
2024-05-30 02:52:46 +02:00
|
|
|
# Create tmp file
|
|
|
|
tmpfile=$(mktemp)
|
2024-08-27 13:54:32 +02:00
|
|
|
|
2024-05-30 02:52:46 +02:00
|
|
|
# Concat files
|
|
|
|
cat hosts/nixos/*/keys/id_*.pub > $tmpfile
|
2024-08-27 13:54:32 +02:00
|
|
|
|
2024-05-30 02:52:46 +02:00
|
|
|
# Copy concat result
|
|
|
|
scp $tmpfile $(cat hosts/nixos/common/optional/services/restic/url.txt):.ssh/authorized_keys
|
2024-08-27 13:54:32 +02:00
|
|
|
|
2024-05-30 02:52:46 +02:00
|
|
|
# Cleanup file
|
|
|
|
rm -rf $tmpfile
|