Startup script now supports multiple profiles.

(cherry picked from commit bc186548d5f9d1b53d58e9abc5e39f7d916dba91)
(cherry picked from commit f7276b8fda49456743b97046b9f8ed6fb22cc8e2)