Code

Created needed structure
[gosa.git] / gosa-si / gosa-si-bus
index 42f6cb70c93396c26bd3c77aa7940799de4395e9..a5d50f1d2429bbd1db64e2b82ba3daeb49cdb56c 100755 (executable)
@@ -1262,6 +1262,12 @@ if(-e $log_file ) { unlink $log_file }
 daemon_log(" ", 1);
 daemon_log("$0 started!", 1);
 
+# forward error messages to logfile
+if( ! $foreground ) {
+       open(STDERR, '>>', $log_file);
+       open(STDOUT, '>>', $log_file);
+}
+
 # Just fork, if we"re not in foreground mode
 if( ! $foreground ) {
        chdir '/'                 or die "Can't chdir to /: $!";