Similar to how the ap-auto script was implemented. Signed-off-by: Ben Greear <greearb@candelatech.com>