Generate the configuration file with a template instead of a bash script