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 '' >> $target +} + + create_httpdconf() { conffile="/opt/wz_mini/etc/httpd.conf" @@ -28,6 +61,7 @@ EOF } + do_start() { create_httpdconf @@ -57,6 +91,7 @@ if [[ "$WEB_SERVER_ENABLED" == "true" ]]; then case "$1" in start) echo "#####$(basename "$0")#####" + compose_home do_start ;; stop) @@ -64,6 +99,7 @@ case "$1" in ;; restart) do_stop + compose_home do_start ;; *) diff --git a/SD_ROOT/wz_mini/www/cgi-bin/GO2RTC_SERVER_ENABLED.md b/SD_ROOT/wz_mini/www/cgi-bin/GO2RTC_SERVER_ENABLED.md new file mode 100644 index 0000000..4b6e9dc --- /dev/null +++ b/SD_ROOT/wz_mini/www/cgi-bin/GO2RTC_SERVER_ENABLED.md @@ -0,0 +1 @@ +GO2RTC_SERVER provide an alternative way to do RTSP and streaming to web! diff --git a/SD_ROOT/wz_mini/www/index.top.html b/SD_ROOT/wz_mini/www/index.top.html new file mode 100644 index 0000000..c42f12a --- /dev/null +++ b/SD_ROOT/wz_mini/www/index.top.html @@ -0,0 +1,25 @@ + + +WZ Mini Web Tools + + + +

Wyze Mini Web Sever Menu