Skip to content

Commit

Permalink
Permits the container to be restarted
Browse files Browse the repository at this point in the history
The startup (entrypoint) will exit if the ssh key was already copied to
the root user configuration in a previous start. Making it conditional
will permit one to restart the container with something `docker-compose
restart master-libvirt`. Otherwise, the container needs to be deleted
and restarted.
  • Loading branch information
fauust committed Nov 13, 2023
1 parent 6895aba commit 2a06f66
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docker-compose/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ echo "Crossbar started"

# ssh-key to connect to workers
if [[ $1 == "master-libvirt" ]]; then
mkdir /root/.ssh
cp id_ed25519 /root/.ssh
cp known_hosts /root/.ssh
[[ -d /root/.ssh ]] || {
mkdir /root/.ssh
cp id_ed25519 /root/.ssh
cp known_hosts /root/.ssh
}
fi

# loop for debug
Expand Down

0 comments on commit 2a06f66

Please sign in to comment.