docs: def main(conf_file, overwrite, logger):
      """
      Create configuration and log file. Restart the daemon when configuration
      is done.
  
      Args:
          conf_file (str): Path to the configuration file.
          overwrite (bool): Overwrite the configuration file with `clean` config?
      """
      uid = pwd.getpwnam(get_username()).pw_uid
  
      # stop the daemon
      logger.info("Stopping the daemon.")
      sh.service(get_service_name(), "stop")
  
      # create files
      logger.info("Creating config file.")
      create_config(
          cnf_file=conf_file,
          uid=uid,
          overwrite=overwrite
      )
      logger.info("Creating log file.")
      create_log(
          log_file=REQUIRED_SETTINGS["LogFile"],
          uid=uid
      )
  
      # start the daemon
      logger.info("Starting the daemon..")
      sh.service(get_service_name(), "start")