Skip to content
Snippets Groups Projects
Commit 70c4f58e 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 #7821 passed with stages
in 36 seconds
......@@ -8,12 +8,17 @@ data:
user_keys_secret_dir="$3"
user_keys_dir="$4"
echo "$(ls -l $host_keys_secret_dir)"
if find $host_keys_secret_dir -mindepth 1 -maxdepth 1 | read; then
cp $host_keys_secret_dir/* $host_keys_dir
if [ "$(ls $host_keys_secret_dir)" ]; then
cp -L $host_keys_secret_dir/* $host_keys_dir
chmod 600 $host_keys_dir/*
else
echo "Host keys are empty!"
fi
if find "$user_keys_secret_dir" -mindepth 1 -maxdepth 1 | read; then
cp $user_keys_secret_dir/* $user_keys_dir
if [ "$(ls $user_keys_secret_dir)" ]; then
cp -L $user_keys_secret_dir/* $user_keys_dir
else
echo "User keys are empty."
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