Univention Bugzilla – Attachment 9040 Details for
Bug 45037
Start AD Connector in foreground without daemonizing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
45037.patch (text/plain), 1.57 KB, created by
Florian Best
on 2017-07-18 16:47:07 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2017-07-18 16:47:07 CEST
Size:
1.57 KB
patch
obsolete
>diff --git a/services/univention-ad-connector/modules/univention/connector/ad/main.py b/services/univention-ad-connector/modules/univention/connector/ad/main.py >index 68c7825..bf2a2d7 100755 >--- a/services/univention-ad-connector/modules/univention/connector/ad/main.py >+++ b/services/univention-ad-connector/modules/univention/connector/ad/main.py >@@ -53,6 +53,7 @@ > parser.add_option( > "--configbasename", dest="configbasename", > help="", metavar="CONFIGBASENAME", default="connector") >+parser.add_option('-n', '--no-daemon', dest='daemonize', default=True, action='store_false', help='Start process in foreground') > (options, args) = parser.parse_args() > > CONFIGBASENAME = "connector" >@@ -66,6 +67,12 @@ > import mapping > > >+def bind_stdout(): >+ if options.daemonize: >+ sys.stdout = open(STATUSLOGFILE, 'w+') >+ return sys.stdout >+ >+ > def daemon(): > try: > pid = os.fork() >@@ -107,9 +114,7 @@ def daemon(): > > > def connect(): >- >- f = open(STATUSLOGFILE, 'w+') >- sys.stdout = f >+ f = bind_stdout() > print time.ctime() > > baseConfig = ConfigRegistry() >@@ -225,8 +230,7 @@ def connect(): > retry_rejected = 0 > connected = True > while connected: >- f = open(STATUSLOGFILE, 'w+') >- sys.stdout = f >+ f = bind_stdout() > print time.ctime() > # Aenderungen pollen > sys.stdout.flush() >@@ -285,8 +289,8 @@ def connect(): > > > def main(): >- >- daemon() >+ if options.daemonize: >+ daemon() > > while True: > try: >@@ -294,8 +298,7 @@ def main(): > except SystemExit: > raise > except: >- f = open(STATUSLOGFILE, 'w+') >- sys.stdout = f >+ f = bind_stdout() > print time.ctime() > > text = ''
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 45037
: 9040