View | Details | Raw Unified | Return to bug 40894
Collapse All | Expand All

(-)a/management/univention-management-console/scripts/univention-management-console-module (-7 / +9 lines)
 Lines 67-81   if __name__ == '__main__': Link Here 
67
	default_debug = MODULE_DEBUG_LEVEL
67
	default_debug = MODULE_DEBUG_LEVEL
68
	parser.add_option( '-d', '--debug', action = 'store', type = 'int', dest = 'debug', default = default_debug,
68
	parser.add_option( '-d', '--debug', action = 'store', type = 'int', dest = 'debug', default = default_debug,
69
					   help = 'if given then debugging is activated and set to the specified level [default: %default]' )
69
					   help = 'if given then debugging is activated and set to the specified level [default: %default]' )
70
	parser.add_option( '-L', '--log-file', action = 'store',  dest = 'logfile', default = 'management-console-module', help = 'specifies an alternative log file [default: %default-<module name>.log]' )
70
	parser.add_option( '-L', '--log-file', action = 'store',  dest = 'logfile', default = 'management-console-module-%(module)s', help = 'specifies an alternative log file [default: %default-<module name>.log]' )
71
	parser.add_option('-f', '--foreground', action='store_true', dest='foreground', default=False, help='do not daemonize the process')
71
72
72
	( options, arguments ) = parser.parse_args()
73
	( options, arguments ) = parser.parse_args()
73
74
74
	daemon = DaemonContext(detach_process=False, prevent_core=False, umask=0077)
75
	if not options.foreground:
75
	daemon.signal_map = {
76
		daemon = DaemonContext(detach_process=False, prevent_core=False, umask=0077)
76
		signal.SIGHUP: lambda signal, frame: log_reopen(),
77
		daemon.signal_map = {
77
	}
78
			signal.SIGHUP: lambda signal, frame: log_reopen(),
78
	daemon.open()
79
		}
80
		daemon.open()
79
81
80
	# MUST be called after initializing the deamon
82
	# MUST be called after initializing the deamon
81
	if options.notifier.lower() == 'generic':
83
	if options.notifier.lower() == 'generic':
 Lines 86-92   if __name__ == '__main__': Link Here 
86
		notifier.init( notifier.QT )
88
		notifier.init( notifier.QT )
87
89
88
	# init logging
90
	# init logging
89
	debug_fd = log_init( '%s-%s' % ( options.logfile, options.module ), options.debug )
91
	debug_fd = log_init(options.logfile % {'module': options.module}, options.debug )
90
	# no notifier logging
92
	# no notifier logging
91
	nflog.instance.handlers = []
93
	nflog.instance.handlers = []
92
	# to activate notifier logging
94
	# to activate notifier logging
(-)a/management/univention-management-console/src/univention/management/console/protocol/server.py (+1 lines)
 Lines 383-388   def __init__(self, port=6670, ssl=True, unix=None, magic=True, magicClass=MagicB Link Here 
383
	def __del__(self):
383
	def __del__(self):
384
		if self.__bucket:
384
		if self.__bucket:
385
			del self.__bucket
385
			del self.__bucket
386
			self.__bucket = None
386
387
387
	def __verify_cert_cb(self, conn, cert, errnum, depth, ok):
388
	def __verify_cert_cb(self, conn, cert, errnum, depth, ok):
388
		CORE.info('__verify_cert_cb: Got certificate: %s' % cert.get_subject())
389
		CORE.info('__verify_cert_cb: Got certificate: %s' % cert.get_subject())

Return to bug 40894