Fallback to shell_exec as some systems lack posix_mkfifo

This commit is contained in:
f0o
2015-03-15 15:14:10 +00:00
parent 478916af4b
commit adebcf6c29
2 changed files with 10 additions and 8 deletions

View File

@@ -128,7 +128,7 @@ class ircbot {
private function connect_alert() {
$f = $this->config['install_dir']."/.ircbot.alert";
if( ( file_exists($f) && filetype($f) != "fifo" && !unlink($f) ) || ( !file_exists($f) && !posix_mkfifo($f,0644) ) ) {
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");
return false;
}