Skip to content
Snippets Groups Projects
Commit 90242a0f authored by Andri Joos's avatar Andri Joos :blush:
Browse files

fix key copying

parent ce95b3d8
No related branches found
No related tags found
No related merge requests found
Pipeline #7812 passed with stages
in 33 seconds
...@@ -8,12 +8,15 @@ data: ...@@ -8,12 +8,15 @@ data:
user_keys_secret_dir="$3" user_keys_secret_dir="$3"
user_keys_dir="$4" user_keys_dir="$4"
if [ "$(ls $host_keys_secret_dir)" ]; then
if find $host_keys_secret_dir -mindepth 1 -maxdepth 1 | read; then cp "$host_keys_secret_dir/*" "$host_keys_dir"
cp $host_keys_secret_dir/* $host_keys_dir chmod 600 "$host_keys_dir/*"
chmod 600 $host_keys_dir/* else
echo "Host keys are empty!"
fi fi
if find "$user_keys_secret_dir" -mindepth 1 -maxdepth 1 | read; then if [ "$(ls $user_keys_secret_dir)" ]; then
cp $user_keys_secret_dir/* $user_keys_dir cp "$user_keys_secret_dir/*" "$user_keys_dir"
else
echo "User keys are empty."
fi fi
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment