From a8b70cf19d6473a81663761b5d26fc10740fba33 Mon Sep 17 00:00:00 2001 From: virmaior <70625876+virmaior@users.noreply.github.com> Date: Thu, 14 Sep 2023 14:30:43 +0900 Subject: [PATCH] pull request to display go2rtc when it is active in the webserver (#606) * improve index.html for wz_mini webserver * shared top for dynamically generated base index * base documentation for go2rtc in webserver It seems like there should be more but I didn't immediately see any... --- SD_ROOT/wz_mini/etc/network.d/S10httpd | 36 +++++++++++++++++++ .../www/cgi-bin/GO2RTC_SERVER_ENABLED.md | 1 + SD_ROOT/wz_mini/www/index.top.html | 25 +++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 SD_ROOT/wz_mini/www/cgi-bin/GO2RTC_SERVER_ENABLED.md create mode 100644 SD_ROOT/wz_mini/www/index.top.html diff --git a/SD_ROOT/wz_mini/etc/network.d/S10httpd b/SD_ROOT/wz_mini/etc/network.d/S10httpd index 4dd3613..31cedbf 100644 --- a/SD_ROOT/wz_mini/etc/network.d/S10httpd +++ b/SD_ROOT/wz_mini/etc/network.d/S10httpd @@ -7,6 +7,39 @@ . /opt/wz_mini/wz_mini.conf + +compose_home() +{ + target=/opt/wz_mini/www/index.html + rm $target + cp /opt/wz_mini/www/index.top.html $target + + + if [[ "$WEB_SERVER_OPTIONS" ]]; then + for part in $WEB_SERVER_OPTIONS + do + case "$part" in + cam) echo 'Wyze Camera Core Config' >> $target ;; + config) echo 'Wz Mini Configuration' >> $target ;; + car) echo 'Car Tool' >> $target ;; + current) echo 'Current Screen' >> $target ;; + diag) echo 'Diagnostics' >> $target ;; + esac + done + + echo 'Multi-Cam' >> $target + fi + + if [[ "$GO2RTC_SERVER_ENABLED" == "true" ]]; then + echo 'Go2RTC Server' >> $target + + fi + + echo '
' >> $target + echo '