fork 0k-charms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
444 B

  1. #!/bin/bash
  2. OPTS=(
  3. host
  4. port
  5. connection-security
  6. auth-method
  7. )
  8. for var in "${OPTS[@]}"; do
  9. value=$(options-get "$var") && relation-set "$var" "$value" || exit 1
  10. case "$var:$value" in
  11. auth-method:password)
  12. login=$(options-get "login") && relation-set login "$login" || exit 1
  13. password=$(options-get "password") && relation-set password "$password" || exit 1
  14. ;;
  15. esac
  16. done