Detect CMS and write config file in correct location.