From 428c0481527ac37fc18522c2b580ad7238ce7cae Mon Sep 17 00:00:00 2001 From: sebclem Date: Sat, 12 Mar 2022 23:54:05 +0100 Subject: [PATCH] Update 'entrypoint' --- entrypoint | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/entrypoint b/entrypoint index f968858..dcae6cd 100755 --- a/entrypoint +++ b/entrypoint @@ -14,14 +14,14 @@ if [[ -z "$PLUGIN_PLAYBOOK" ]]; then exit 1 fi -# if [[ -z "$PLUGIN_PRIVATE_KEY" ]]; then -# echo -e "\e[31m[WARN] 'private_key' setting not defined !\e[39m" -# else - -# run_command "mkdir /root/.ssh" -# echo "$PLUGIN_PRIVATE_KEY" > /root/.ssh/id_ed25519 -# run_command chmod 400 /root/.ssh/id_ed25519 -# fi +if [[ -z "$PLUGIN_PRIVATE_KEY" ]]; then + echo -e "\e[31m[WARN] 'private_key' setting not defined !\e[39m" +else + + run_command "mkdir /root/.ssh" + echo "$PLUGIN_PRIVATE_KEY" > /root/.ssh/id_ed25519 + run_command chmod 400 /root/.ssh/id_ed25519 +fi args=("$PLUGIN_PLAYBOOK")