diff --git a/encoder/firmware.php b/encoder/firmware.php
index 6749cb0..0a01d80 100755
--- a/encoder/firmware.php
+++ b/encoder/firmware.php
@@ -1,11 +1,11 @@
'
- . htmlspecialchars("message", ENT_QUOTES) .
+ . htmlspecialchars($data['message'], ENT_QUOTES) .
'
Refreshing in
100
@@ -155,7 +155,6 @@ const interval = setInterval(() => {
if (seconds <= 0) {
clearInterval(interval);
- location.reload();
}
}, 1000);
diff --git a/encoder/request_cert.php b/encoder/request_cert.php
index c0081e7..ad32109 100755
--- a/encoder/request_cert.php
+++ b/encoder/request_cert.php
@@ -102,6 +102,14 @@ if ($subdomains_raw !== '') {
}
}
+exec("sudo systemctl stop nginx");
+sleep(3);
+exec("sudo certbot delete --all");
+sleep(3);
+exec("sudo systemctl restart nginx");
+sleep(3);
+
+
// Merge primary domain + subdomains
$domains = array_values(array_unique(array_merge([$domain], $subdomains)));
diff --git a/encoder/static.php b/encoder/static.php
index 5862d67..34e393f 100755
--- a/encoder/static.php
+++ b/encoder/static.php
@@ -1216,6 +1216,7 @@ function update_service_backend($service, $srt_pass1, $srt_pass2)
'custom_output' => ''
];
+
for ($i = 1; $i <= 11; $i++) {
$defaults['rtmp0_multiple'][$i] = ['url' => '', 'name' => '', 'enabled' => false];
$defaults['rtmp1_multiple'][$i] = ['url' => '', 'name' => '', 'enabled' => false];
@@ -1309,11 +1310,6 @@ function update_service_backend($service, $srt_pass1, $srt_pass2)
}
}
- $rtmp_input_copy = "";
- if ($use_common_backend == 'transcode_every_time') {
- $rtmp_input_copy = "push rtmp://127.0.0.1/shree/bhattji;";
- }
-
$nginx = "
user www-data;
worker_processes auto;
@@ -1343,8 +1339,6 @@ rtmp {
sync 10ms;
idle_streams off;
-
- " . $rtmp_input_copy . "
}
";
diff --git a/install.sh b/install.sh
index 4fac1da..a650035 100755
--- a/install.sh
+++ b/install.sh
@@ -11,56 +11,30 @@ EOL
cat > /etc/apache2/sites-available/000-default.conf << 'EOL'
-
- ServerAdmin webmaster@localhost
- DocumentRoot /var/www/encoder
-
- ErrorLog ${APACHE_LOG_DIR}/error.log
- CustomLog ${APACHE_LOG_DIR}/access.log combined
-
-
-EOL
-
-cat > /etc/apache2/sites-available/default-ssl.conf << 'EOL'
-
-
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/encoder
- ErrorLog ${APACHE_LOG_DIR}/encoder-ssl-error.log
- CustomLog ${APACHE_LOG_DIR}/encoder-ssl-access.log combined
+ ErrorLog ${APACHE_LOG_DIR}/encoder-error.log
+ CustomLog ${APACHE_LOG_DIR}/encoder-access.log combined
SSLEngine on
- SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
- SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
+ SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
+ SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
-
-
- SSLOptions +StdEnvVars
-
-
-
- SSLOptions +StdEnvVars
-
-
EOL
cat>/etc/apache2/ports.conf<< 'EOL'
Listen 8080
-
- Listen 8443
-
-
-
- Listen 8443
+
+ Listen 8080
EOL
diff --git a/setup.sh b/setup.sh
index ceeaf0a..7d30655 100644
--- a/setup.sh
+++ b/setup.sh
@@ -4,6 +4,36 @@ sudo cp attempts.json /var/www/attempts.json
DEVICE_ID="$(sudo cat /sys/class/dmi/id/product_uuid | tr -d '\n')"
sudo sed -i 's/certificatecertificatecertificatecertificate/'$DEVICE_ID'/g' /var/www/html/certification.html
+cat > /etc/apache2/sites-available/000-default.conf << 'EOL'
+
+ ServerName localhost
+ ServerAdmin webmaster@localhost
+ DocumentRoot /var/www/encoder
+
+ ErrorLog ${APACHE_LOG_DIR}/encoder-error.log
+ CustomLog ${APACHE_LOG_DIR}/encoder-access.log combined
+
+ SSLEngine on
+ SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
+ SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
+
+
+ Options Indexes FollowSymLinks
+ AllowOverride All
+ Require all granted
+
+
+EOL
+
+cat>/etc/apache2/ports.conf<< 'EOL'
+Listen 8080
+
+
+ Listen 8080
+
+EOL
+
+
SOURCE_FILE="users.json"
TARGET_FILE="/var/www/users.json"
@@ -48,6 +78,5 @@ server {
}
EOL
-
sudo chown -R www-data:www-data /var/www/*
sudo reboot
\ No newline at end of file