Better pipes for plugins

Version 1.453


1) Previously DA only listened for stdout from a plugin, and stderr went nowhere. Now, stderr is piped to /dev/null. (make sure all your errors are stdout if you want to read them) 2) When DA forked the to the child process, before the exec for the plugin script, the socket to port 2222 wasn't opened. For most plugins, this wouldn't be a problem.. but the issue arises when the plugin wants to spawn it's own background process with setsid(); Although DA did return all output and DA closed the client pipe, it wasn't actually closed to the client because the child was still holding it open. Fix was to close the 2222 pipe after the fork, in the child process, before the plugin was called with exec. 3) The main directadmin process will now re-direct stdout/stderr to /dev/null. Previously, they were just closed, which could in theory cause issues if any script or child process were to output text that DA wasn't reading in, as it would eventually fill the buffer. There will be a new internal directadmin.conf value, the default is: pipe_log=/dev/null If you want to see if there is any output, you can add the value to the direcatdmin.conf, eg: pipe_log=/var/log/directadmin/pipe.log it will have root write access. There really shouldn't be any output, but it could be possible for errors from programs that DA isn't capturing.

Interested to try DirectAdmin? Get a 30-day Free Trial!