mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 07:30:24 +00:00
systemd
This commit is contained in:
parent
83c6e37a48
commit
6ef55aeb83
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ trap "sleep 1; continue" ERR
|
||||||
|
|
||||||
try_times=30
|
try_times=30
|
||||||
counter=1
|
counter=1
|
||||||
|
portainer_username="admin"
|
||||||
|
|
||||||
copy_credential() {
|
copy_credential() {
|
||||||
source_container=$1
|
source_container=$1
|
||||||
|
@ -26,7 +27,7 @@ copy_credential() {
|
||||||
else
|
else
|
||||||
# If it is not JSON format, get the content and convert it to JSON
|
# If it is not JSON format, get the content and convert it to JSON
|
||||||
content=$(cat "$temp_file")
|
content=$(cat "$temp_file")
|
||||||
json="{\"username\":\"$username\",\"password\":\"$content\"}"
|
json="{\"username\":\"$portainer_username\",\"password\":\"$content\"}"
|
||||||
echo "$json" > "$temp_file"
|
echo "$json" > "$temp_file"
|
||||||
docker cp "$temp_file" "$destination_container:$destination_path"
|
docker cp "$temp_file" "$destination_container:$destination_path"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue