fix(ssh): image has a start script already

This commit is contained in:
yeti 2025-04-17 16:02:51 +01:00
parent a62208b1fd
commit f1a93ae19e

2
ssh_router.sh Normal file → Executable file
View 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"