awk从配置文件路径获取.ini值

I am trying to grab 2 values from my config.ini, which is in /settings/config.ini and run a bash script with the variables.

[wifi]
ssid = myssid
password = myssidpass

script.sh

ssid=$(awk '/^ssid/{print $3}' /settings/config.ini)
pw=$(awk '/^password/{print $3}' /settings/config.ini)
./wifi -ssid "$ssid" -pass "$pw"

当config.ini驻留在同一文件夹路径中时,它将查找变量。一旦超出脚本路径,它将无法正常工作。我如何告诉awk从完整路径获取它? 谢谢