update: Fixed locating and profile setting

* Made sure that we only get APs once and also that we set the profile
  correctly from the command line.

Signed-off-by: mr.Shu <mr@shu.io>