Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Oskars Germovs <[email protected]>
  • Loading branch information
Faks committed Mar 22, 2024
1 parent 0e50d4c commit 70330c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ COPY install_ssh_keys.sh /usr/local/bin/install_ssh_keys.sh
RUN chmod +x /usr/local/bin/install_ssh_keys.sh
RUN /usr/local/bin/install_ssh_keys.sh

rm -rf /tmp/secure_ssh_keys && \
rm -rf /tmp/insecure_ssh_keys

RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
rm -f /etc/service/sshd/down && \
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \
Expand Down
4 changes: 0 additions & 4 deletions workspace/install_ssh_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@ files=("id_rsa" "id_rsa.pub")
for file in "${files[@]}"; do
if [ -f "$secure_path/$file" ]; then
cp "$tmp_dir/$secure_path/$file" "$tmp_dir/$file" || { echo "Failed to copy $tmp_dir/$secure_path/$file."; exit 1; }
#rm -rf "$tmp_dir/$secure_path" || { echo "Failed to remove '$tmp_dir/$secure_path'."; exit 1; }
#echo "Removed '$tmp_dir/$secure_path'."
else
cp "$tmp_dir/$insecure_path/$file" "$tmp_dir/$file" || { echo "Failed to copy $tmp_dir/$insecure_path/$file."; exit 1; }
#rm -rf "$tmp_dir/$insecure_path" || { echo "Failed to remove '$tmp_dir/$insecure_path'."; exit 1; }
#echo "Removed '$tmp_dir/$insecure_path'."
fi
done

Expand Down

0 comments on commit 70330c3

Please sign in to comment.