From 6ef55aeb83bbdf562f42d57f4027aa58467c58b0 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Sat, 23 Sep 2023 11:14:00 +0800 Subject: [PATCH] systemd --- systemd/send_credentials.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/systemd/send_credentials.sh b/systemd/send_credentials.sh index ff2af554..6e150e88 100644 --- a/systemd/send_credentials.sh +++ b/systemd/send_credentials.sh @@ -6,6 +6,7 @@ trap "sleep 1; continue" ERR try_times=30 counter=1 +portainer_username="admin" copy_credential() { source_container=$1 @@ -26,7 +27,7 @@ copy_credential() { else # If it is not JSON format, get the content and convert it to JSON content=$(cat "$temp_file") - json="{\"username\":\"$username\",\"password\":\"$content\"}" + json="{\"username\":\"$portainer_username\",\"password\":\"$content\"}" echo "$json" > "$temp_file" docker cp "$temp_file" "$destination_container:$destination_path" fi