Fix SSH target parsing bug in deploy.sh
- Redirect select UI output to stderr to prevent multiline capture - Only SSH target goes to stdout for clean variable assignment - Fixes 'invalid user name' error from corrupted ssh_target variable - SSH connection now works properly like manual ssh command 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -50,20 +50,19 @@ get_deployable_scripts() {
|
||||
printf '%s\n' "${scripts[@]}" | sort
|
||||
}
|
||||
|
||||
# Einfache Server-Auswahl
|
||||
# Einfache Server-Auswahl (nur Target zurückgeben)
|
||||
select_server() {
|
||||
echo "=== Server-Auswahl ==="
|
||||
local servers=("web" "mx" "logger" "support")
|
||||
local server
|
||||
|
||||
select server in "${servers[@]}"; do
|
||||
[[ -n "$server" ]] || { echo "Ungültige Auswahl"; continue; }
|
||||
select server in "${servers[@]}" >&2; do
|
||||
[[ -n "$server" ]] || { echo "Ungültige Auswahl" >&2; continue; }
|
||||
|
||||
case "$server" in
|
||||
web|mx)
|
||||
echo -n "Server-Nummer eingeben: "
|
||||
echo -n "Server-Nummer eingeben: " >&2
|
||||
read -r number
|
||||
[[ "$number" =~ ^[0-9]+$ ]] || { echo "Ungültige Nummer"; continue; }
|
||||
[[ "$number" =~ ^[0-9]+$ ]] || { echo "Ungültige Nummer" >&2; continue; }
|
||||
echo "${LUSER}@${server}${number}.in.easyname.com"
|
||||
return 0
|
||||
;;
|
||||
@@ -182,6 +181,7 @@ main() {
|
||||
done
|
||||
|
||||
# Server-Auswahl
|
||||
echo "=== Server-Auswahl ==="
|
||||
local ssh_target
|
||||
ssh_target=$(select_server)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user