Улучши удаление и строку статуса VPN
This commit is contained in:
@@ -146,11 +146,11 @@ _module_status_json() {
|
||||
_module_human_part() {
|
||||
local name="$1" enabled="$2" installed="$3"
|
||||
if [[ "$enabled" == "0" ]]; then
|
||||
printf '%s=off' "$name"
|
||||
printf '⏭️ %s=off' "$name"
|
||||
elif [[ "$installed" == "true" ]]; then
|
||||
printf '%s=on' "$name"
|
||||
printf '✅ %s=on' "$name"
|
||||
else
|
||||
printf '%s=missing' "$name"
|
||||
printf '⚠️ %s=missing' "$name"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -172,15 +172,20 @@ _module_status_human() {
|
||||
app_installed="$(_module_bool test -x "$APP_DIR/Contents/MacOS/LemanaVPN")"
|
||||
app_autostart="$(_module_bool test -f "$LAUNCH_AGENT")"
|
||||
|
||||
printf 'Modules: %s, ' "$core"
|
||||
printf 'Modules: %s %s, ' "$([[ "$core" == "core=ok" ]] && printf '✅' || printf '⚠️')" "$core"
|
||||
_module_human_part "bitwarden" "$USE_BITWARDEN" "$bitwarden_installed"
|
||||
printf ', '
|
||||
_module_human_part "touchid" "$USE_TOUCHID" "$touchid_installed"
|
||||
printf ', dns=%s, app=%s, autostart=%s, patches=%s, keychain=password:%s/totp_seed:%s\n' \
|
||||
printf ', %s dns=%s, %s app=%s, %s autostart=%s, %s patches=%s, %s keychain=password:%s/totp_seed:%s\n' \
|
||||
"$([[ "$dns_cleanup_installed" == "true" ]] && printf '✅' || printf '⚠️')" \
|
||||
"$([[ "$dns_cleanup_installed" == "true" ]] && printf on || printf missing)" \
|
||||
"$([[ "$app_installed" == "true" ]] && printf '✅' || printf '⚠️')" \
|
||||
"$([[ "$app_installed" == "true" ]] && printf on || printf missing)" \
|
||||
"$([[ "$app_autostart" == "true" ]] && printf '✅' || printf '⏭️')" \
|
||||
"$([[ "$app_autostart" == "true" ]] && printf on || printf off)" \
|
||||
"$([[ "$patches_active" == "true" ]] && printf '✅' || printf '⚠️')" \
|
||||
"$([[ "$patches_active" == "true" ]] && printf active || printf pending)" \
|
||||
"$([[ "$keychain_password" == "true" && "$keychain_totp_seed" == "true" ]] && printf '✅' || printf '⚠️')" \
|
||||
"$([[ "$keychain_password" == "true" ]] && printf yes || printf no)" \
|
||||
"$([[ "$keychain_totp_seed" == "true" ]] && printf yes || printf no)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user