Exemple #1
0
 def setup_daemon_kwargs(self,
                         kwargs,
                         name=None,
                         description=None,
                         output=None):
     """
     Initialize daemon keyword arguments.
     """
     daemon_name = utility.daemon_file_name(
         base_name=name,
         host=getattr(self.opts, 'host', None),
         instance=getattr(self.opts, 'instance', None))
     # Default daemon output directory to the state directory, which is
     # frequently set to ~/.<command_name>.
     daemon_output = output
     if daemon_output is None:
         daemon_output = utility.get_state_directory()
     # Provide a generic description if one wasn't provided.
     daemon_description = description
     if daemon_description is None:
         daemon_description = "server"
     kwargs['daemon'] = True
     kwargs['daemon_name'] = daemon_name
     kwargs['daemon_description'] = daemon_description
     kwargs['daemon_output'] = daemon_output
Exemple #2
0
 def setup_daemon_kwargs(self, kwargs, name=None, description=None, output=None):
     """
     Initialize daemon keyword arguments.
     """
     daemon_name = utility.daemon_file_name(
         base_name=name, host=getattr(self.opts, "host", None), instance=getattr(self.opts, "instance", None)
     )
     # Default daemon output directory to the state directory, which is
     # frequently set to ~/.<command_name>.
     daemon_output = output
     if daemon_output is None:
         daemon_output = utility.get_state_directory()
     # Provide a generic description if one wasn't provided.
     daemon_description = description
     if daemon_description is None:
         daemon_description = "server"
     kwargs["daemon"] = True
     kwargs["daemon_name"] = daemon_name
     kwargs["daemon_description"] = daemon_description
     kwargs["daemon_output"] = daemon_output