mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Fallback to shell_exec as some systems lack posix_mkfifo
This commit is contained in:
@@ -22,11 +22,13 @@
|
||||
*/
|
||||
|
||||
$f = $config['install_dir']."/.ircbot.alert";
|
||||
$f = fopen($f,"w+");
|
||||
$r = fwrite($f,json_encode($obj)."\n");
|
||||
$f = fclose($f);
|
||||
if( $r === false ) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
if( file_exists($f) && filetype($f) == "fifo" ) {
|
||||
$f = fopen($f,"w+");
|
||||
$r = fwrite($f,json_encode($obj)."\n");
|
||||
$f = fclose($f);
|
||||
if( $r === false ) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user