From d056b385d71d5b33165ab87cbedffb243d168c8a Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 20 Apr 2022 13:07:39 +0200 Subject: Refactor secrets --- sshtool | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sshtool') diff --git a/sshtool b/sshtool index 94a3ea0..b5de384 100755 --- a/sshtool +++ b/sshtool @@ -68,6 +68,19 @@ EOG EOF } +function copy_secret { + local FROM=$1 + local TO=$2 + cat < /dev/null +$(base64 <$FROM) +EOG +chown root:root $TO +chmod 0600 $TO +EOF +} + for NIXHOST in $NIXHOSTLIST; do NIXHOST=${NIXHOST%.*} -- cgit v1.2.3