diff --git a/encoder/static.php b/encoder/static.php
index 61d89e9..9c9811a 100755
--- a/encoder/static.php
+++ b/encoder/static.php
@@ -183,7 +183,6 @@ function update_service($which_service)
case 'display';
break;
case 'rtmp';
- //if hls service enable add this to nginx
if ($service_rtmp_hls === "enable") {
$hls = "
hls on;
@@ -195,8 +194,6 @@ function update_service($which_service)
$hls = "
";
}
-
- //if dash service enable add this to nginx
if ($service_rtmp_dash === "enable") {
$dash = "
dash on;
@@ -313,10 +310,10 @@ http {
exec('sudo systemctl restart encoder-rtmp');
} else {
error_log("Error Nginx default");
-# exec('sudo cp /var/www/nginx.conf /etc/nginx/');
-# exec("sudo systemctl restart nginx");
-# exec('sudo systemctl stop encoder-rtmp');
-# exec('sudo systemctl disable encoder-rtmp');
+ exec('sudo cp /var/www/nginx.conf /etc/nginx/');
+ exec("sudo systemctl restart nginx");
+ exec('sudo systemctl stop encoder-rtmp');
+ exec('sudo systemctl disable encoder-rtmp');
}
} {
}
diff --git a/encoder/status.php b/encoder/status.php
index f9d06cd..a341480 100755
--- a/encoder/status.php
+++ b/encoder/status.php
@@ -1,9 +1,370 @@
+
+
Input Service
+ &1");
+ $status = trim($status);
+
+ if ($status === "active")
+ $serviceEnabled = true;
+ else
+ $serviceEnabled = false;
+ ?>
+
+
+
+ Service
+
+
+ Enabled
+
+ Disabled
+
+
+
+
+
+
+
+
RTMP Server
+ &1");
+ $status = trim($status);
+
+ if ($status === "active")
+ $serviceEnabled = true;
+ else
+ $serviceEnabled = false;
+
+ $m3u8_url = 'https://example.com/live/stream.m3u8';
+ ?>
+
+
+
+
+
+ Service
+
+
+ Enabled
+
+ Disabled
+
+
+
+
+
+
+
+
+
SRT Server
+ &1");
+ $status = trim($status);
+
+ if ($status === "active")
+ $serviceEnabled = true;
+ else
+ $serviceEnabled = false;
+ ?>
+
+
+
+
+
+ Service
+
+
+ Enabled
+
+ Disabled
+
+
+
+
+
+
+
+
+
Udp Service
+ &1");
+ $status = trim($status);
+
+ if ($status === "active")
+ $serviceEnabled = true;
+ else
+ $serviceEnabled = false;
+ ?>
+
+
+
+
+
+ Service
+
+
+ Enabled
+
+ Disabled
+
+
+
+
+
+
+
+
+
Custom Output Service
+ &1");
+ $status = trim($status);
+
+ if ($status === "active")
+ $serviceEnabled = true;
+ else
+ $serviceEnabled = false;
+ ?>
+
+
+
+ Service
+
+
+ Enabled
+
+ Disabled
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/install.sh b/install.sh
index b842e47..60742bf 100755
--- a/install.sh
+++ b/install.sh
@@ -173,7 +173,7 @@ from collections import deque
from datetime import datetime
import psutil
-OUT_FILE = "/var/www/html/metrics.json"
+OUT_FILE = "/var/www/encoder/metrics.json"
TMP_FILE = OUT_FILE + ".tmp"
SAMPLE_INTERVAL = 10.0 # seconds between samples
HISTORY_SECONDS = 15 * 60 # 15 minutes
@@ -305,14 +305,8 @@ server {
index index.php index.html;
location / {
- try_files \$uri \$uri/ =404;
+ try_files $uri $uri/ =404;
}
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/run/php/php8.3-fpm.sock;
- }
-
- location ~ /\. { deny all; }
}
EOL