summaryrefslogtreecommitdiff
path: root/includes/include.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/include.php')
-rwxr-xr-xincludes/include.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/includes/include.php b/includes/include.php
index 1678b6d..5324609 100755
--- a/includes/include.php
+++ b/includes/include.php
@@ -20,13 +20,16 @@ function selectpage()
$subcmd = "";
// Get segmenter PID
- $pidfile = fopen('ram/streamsegmenterpid', 'r');
- if ($pidfile)
+ if (file_exists("ram/streamsegmenterpid"))
{
- $pid = fgets($pidfile);
- $pid = substr($pid, 0, -1);
- $subcmd = "kill " .$pid ." ; ";
- fclose($pidfile);
+ $pidfile = fopen('ram/streamsegmenterpid', 'r');
+ if ($pidfile)
+ {
+ $pid = fgets($pidfile);
+ $pid = substr($pid, 0, -1);
+ $subcmd = "kill " .$pid ." ; ";
+ fclose($pidfile);
+ }
}
$cmd= $subcmd ."rm ram/stream*";