Updated STDIN
The script tried to read from stdin wihch is already consumed from the pipe. Altered to read from the TTY not STDIN
This commit is contained in:
@@ -125,7 +125,7 @@ docker logout "$REGISTRY" >/dev/null 2>&1 || true
|
|||||||
|
|
||||||
REG_USER="krkn-registry"
|
REG_USER="krkn-registry"
|
||||||
|
|
||||||
read -rsp "Registry access token: " REG_PASS
|
read -rsp "Registry access token: " REG_PASS < /dev/tty
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "$REG_PASS" | docker login "$REGISTRY" -u "$REG_USER" --password-stdin || {
|
echo "$REG_PASS" | docker login "$REGISTRY" -u "$REG_USER" --password-stdin || {
|
||||||
@@ -137,14 +137,14 @@ echo "$REG_PASS" | docker login "$REGISTRY" -u "$REG_USER" --password-stdin || {
|
|||||||
# Prompt config
|
# Prompt config
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
echo
|
echo
|
||||||
read -rp "Orchestrator address (e.g. https://krkn.example.com): " ORCH_ADDR
|
read -rp "Orchestrator address (e.g. https://krkn.example.com): " ORCH_ADDR < /dev/tty
|
||||||
if [ -z "$ORCH_ADDR" ]; then
|
if [ -z "$ORCH_ADDR" ]; then
|
||||||
err "Orchestrator address is required."
|
err "Orchestrator address is required."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DEFAULT_WORKER_ID="$(hostname)"
|
DEFAULT_WORKER_ID="$(hostname)"
|
||||||
read -rp "Worker ID [${DEFAULT_WORKER_ID}]: " WORKER_ID
|
read -rp "Worker ID [${DEFAULT_WORKER_ID}]: " WORKER_ID < /dev/tty
|
||||||
WORKER_ID="${WORKER_ID:-$DEFAULT_WORKER_ID}"
|
WORKER_ID="${WORKER_ID:-$DEFAULT_WORKER_ID}"
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user