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
|
2024-10-11 12:16:46 +02:00
|
|
|
cat hosts/nixos/*/keys/*.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
|