Rework startup script to handle additional configuration options for standalone and domain modes