示例#1
0
    def __init__(self):
        NetworkCore.__init__(self)

        cherrypy.tools.bcfg2_authn = cherrypy.Tool('on_start_resource',
                                                   self.do_authn)

        #: List of exposed plugin RMI
        self.rmi = self._get_rmi()
        cherrypy.engine.subscribe('stop', self.shutdown)
示例#2
0
    def __init__(self):
        NetworkCore.__init__(self)

        cherrypy.tools.bcfg2_authn = cherrypy.Tool('on_start_resource',
                                                   self.do_authn)

        #: List of exposed plugin RMI
        self.rmi = self._get_rmi()
        cherrypy.engine.subscribe('stop', self.shutdown)
示例#3
0
    def __init__(self):
        NetworkCore.__init__(self)

        #: The :class:`Bcfg2.Server.SSLServer.XMLRPCServer` instance
        #: powering this server core
        self.server = None

        daemon_args = dict(uid=Bcfg2.Options.setup.daemon_uid,
                           gid=Bcfg2.Options.setup.daemon_gid,
                           umask=int(Bcfg2.Options.setup.umask, 8),
                           detach_process=True)
        if Bcfg2.Options.setup.daemon:
            daemon_args['pidfile'] = TimeoutPIDLockFile(
                Bcfg2.Options.setup.daemon, acquire_timeout=5)
        #: The :class:`daemon.DaemonContext` used to drop
        #: privileges, write the PID file (with :class:`PidFile`),
        #: and daemonize this core.
        self.context = daemon.DaemonContext(**daemon_args)
示例#4
0
    def __init__(self):
        NetworkCore.__init__(self)

        #: The :class:`Bcfg2.Server.SSLServer.XMLRPCServer` instance
        #: powering this server core
        self.server = None

        daemon_args = dict(uid=Bcfg2.Options.setup.daemon_uid,
                           gid=Bcfg2.Options.setup.daemon_gid,
                           umask=int(Bcfg2.Options.setup.umask, 8),
                           detach_process=True)
        if Bcfg2.Options.setup.daemon:
            daemon_args['pidfile'] = TimeoutPIDLockFile(
                Bcfg2.Options.setup.daemon, acquire_timeout=5)
        #: The :class:`daemon.DaemonContext` used to drop
        #: privileges, write the PID file (with :class:`PidFile`),
        #: and daemonize this core.
        self.context = daemon.DaemonContext(**daemon_args)