Уточни подключение без Bitwarden

This commit is contained in:
2026-05-19 18:31:06 +03:00
parent 417138b3b1
commit cdc0207e94
5 changed files with 118 additions and 14 deletions

View File

@@ -52,6 +52,7 @@ uninstall_output="$(
printf '%s\n' "$uninstall_output" | grep -q 'Начинаю удаление Lemana VPN'
printf '%s\n' "$uninstall_output" | grep -q 'Проверяю runtime-патчи openconnect-lite'
printf '%s\n' "$uninstall_output" | grep -q 'Удаляю sudoers и DNS cleanup wrapper'
printf '%s\n' "$uninstall_output" | grep -q 'killall LemanaVPN # if running'
printf '%s\n' "$uninstall_output" | grep -q 'Удаляю VPN-записи из macOS Keychain'
if printf '%s\n' "$uninstall_output" | grep -q "$esc"; then
@@ -59,6 +60,25 @@ if printf '%s\n' "$uninstall_output" | grep -q "$esc"; then
exit 1
fi
missing_user="lemana-smoke-missing-$$"
set +e
manual_output="$(
HOME="$HOME" \
LEMANA_VPN_USERNAME="$missing_user" \
LEMANA_VPN_USE_BITWARDEN=0 \
bash "$ROOT/bin/vpn-lemanapro.sh" --json 2>&1
)"
manual_code=$?
set -e
[ "$manual_code" -ne 0 ]
printf '%s\n' "$manual_output" | grep -q '"event":"keychain_required"'
printf '%s\n' "$manual_output" | grep -q 'vpn --configure-keychain'
if printf '%s\n' "$manual_output" | grep -q 'Cleaning up VPN DNS'; then
echo "missing manual credentials should fail before VPN cleanup trap is installed" >&2
exit 1
fi
fake_pwd="$TMP_DIR/fake-pwd"
mkdir -p "$fake_pwd/bin"
printf 'stale local cli\n' > "$fake_pwd/bin/vpn-lemanapro.sh"