static log

This commit is contained in:
devdatt 2025-11-23 11:05:59 +05:30
parent 97d6e48713
commit 472b35894c
1 changed files with 2 additions and 0 deletions

View File

@ -307,10 +307,12 @@ http {
exec('sudo cp /var/www/nginx.conf /etc/nginx/');
exec("$nginx -t 2>&1", $output, $status);
if ($status === 0) {
error_log("nginx tested fine ");
exec("sudo systemctl restart nginx 2>&1", $o, $s);
exec('sudo systemctl enable encoder-rtmp');
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');