diff --git a/encoder/static.php b/encoder/static.php index a60d4af..5773208 100755 --- a/encoder/static.php +++ b/encoder/static.php @@ -308,10 +308,13 @@ http { exec("$nginx -t 2>&1", $output, $status); if ($status === 0) { exec("sudo systemctl restart nginx 2>&1", $o, $s); + exec('sudo systemctl enable encoder-rtmp'); exec('sudo systemctl restart encoder-rtmp'); } else { 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/install.sh b/install.sh index 67fadd3..b842e47 100755 --- a/install.sh +++ b/install.sh @@ -338,5 +338,5 @@ sudo systemctl status srt.service --no-pager sudo systemctl enable --now nginx.service sudo systemctl status nginx.service --no-pager -sudo chmod -R 777 /var/www/html/* -sudo chown -R www-data:www-data /var/www/html/* \ No newline at end of file +sudo chmod 777 -R /var/www +sudo chown -R www-data:www-data /var/www \ No newline at end of file