fix(ssh): image has a start script already
This commit is contained in:
parent
a62208b1fd
commit
f1a93ae19e
2
ssh_router.sh
Normal file → Executable file
2
ssh_router.sh
Normal file → Executable file
@ -29,7 +29,7 @@ start_container_if_needed() {
|
||||
--hostname "$CONTAINER" \
|
||||
--label auto-cleanup=true \
|
||||
-v "${XDG_RUNTIME_DIR}"/podman/podman.sock:/run/podman/podman.sock \
|
||||
"$IMAGE" sh -c "$TMUX_CMD has-session -t $TMUX_SESSION 2>/dev/null || $TMUX_CMD new-session -s $TMUX_SESSION"
|
||||
"$IMAGE"
|
||||
elif ! podman inspect -f '{{.State.Running}}' "$CONTAINER" | grep -q true; then
|
||||
log "⚡ Starting existing container $CONTAINER..."
|
||||
podman start "$CONTAINER"
|
||||
|
Loading…
x
Reference in New Issue
Block a user