mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Ensure irc fifo-file is shared between dispatcher and core containers (#14647)
* Ensure fifo-file is shared between dispatcher container and core container * Fix config path
This commit is contained in:
@@ -218,7 +218,12 @@ class IRCBot
|
||||
|
||||
private function connectAlert()
|
||||
{
|
||||
$f = $this->config['install_dir'] . '/.ircbot.alert';
|
||||
$container_dir = '/data';
|
||||
if (file_exists($container_dir) and posix_getpwuid(fileowner($container_dir))['name'] == 'librenms') {
|
||||
$f = $container_dir . '/.ircbot.alert';
|
||||
} else {
|
||||
$f = $this->config['install_dir'] . '/.ircbot.alert';
|
||||
}
|
||||
if ((file_exists($f) && filetype($f) != 'fifo' && ! unlink($f)) || (! file_exists($f) && ! shell_exec("mkfifo $f && echo 1"))) {
|
||||
$this->log('Error - Cannot create Alert-File');
|
||||
|
||||
|
Reference in New Issue
Block a user