fix duplicate S10httpd

This commit is contained in:
gtxaspec 2023-09-26 01:38:25 -07:00
parent 6cda362ee8
commit 4719cb5634
5 changed files with 15 additions and 136 deletions

View File

@ -18,9 +18,9 @@ Using this project can potentially expose your device to the open internet depen
* Block remote or app initiated firmware updates
* DNS Spoofing or Telnet mod are *not* required prior to installation
* RTSP Streaming Support:
* v4l2rtspserver
* go2rtc
* RTMP Streaming - Stream live video from the camera to your favorite service, youtube, twitch, or facebook live.
* v4l2rtspserver (deprecated)
* RTMP Streaming - via go2rtc: Stream live video from the camera to your favorite service, youtube, twitch, or facebook live.
* Networking:
* Wireguard, IPv6, CIFS/Samba and iptables support enabled
* Tether your camera directly to android phones using USB via RNDIS support
@ -32,13 +32,9 @@ Using this project can potentially expose your device to the open internet depen
* CDC-Ether Based Adapters
* USB Mass storage enabled, mount USB SSD/HDD/flash drives
* Play audio to the camera speaker from files or streaming audio!
* WebCam Mode - Use your camera as a spare UVC USB Web Camera on your PC or AndroidTV!
* Webcam Mode - Use your camera as a spare UVC USB Web Camera on your PC, Mac, or AndroidTV!
* Custom boot script support included
## How you can help!
* Vertical Tilt on the PANv2 doesn't work properly. Only does this on the modified kernel. Need investigation why this happens.
## Why?
* Most things in life relate to cats somehow. I started this project to track the local feral cat population in my neighborhood using cameras.
@ -55,13 +51,6 @@ Using this project can potentially expose your device to the open internet depen
#### Visit the [Installation & Setup](https://github.com/gtxaspec/wz_mini_hacks/wiki/Setup-&-Installation) section of the [Wiki](https://github.com/gtxaspec/wz_mini_hacks/wiki) for details!
## What Works / What Doesn't Work
* Everything works except:
1. PAN v2:
- Tilt (Vertical) only works at motor speed 9
## HELP! SOMETHING DOESN'T DOESN'T WORK
* If you need assistance, or have general questions, feel free to visit the [Discussions](https://github.com/gtxaspec/wz_mini_hacks/discussions) area! There are folks always willing to help out.
@ -99,7 +88,9 @@ Inspired by HclX, bakueikozo, and mnakada!
Thank you to everyone who is passionate about Wyze products for making the devices popular, and thank you to Wyze for producing them. Sign up for CamPlus, show some love and support to the company.
Thanks for HclX for WyzeHacks! [https://github.com/HclX/WyzeHacks/](https://github.com/HclX/WyzeHacks/)
Thank you AlexxIT for the amazing go2rtc project! [https://github.com/AlexxIT/go2rtc](https://github.com/AlexxIT/go2rtc)
Thanks for HclX for WyzeHacks! [https://github.com/HclX/WyzeHacks](https://github.com/HclX/WyzeHacks/)
Thank you mnakada for his atomcam_tools fork! [https://github.com/mnakada/atomcam_tools](https://github.com/mnakada/atomcam_tools)

View File

@ -23,11 +23,17 @@ compose_home()
config) echo '<a class="server_LINK" href="/cgi-bin/config.cgi" >Wz Mini Configuration</a>' >> $target ;;
car) echo '<a class="server_LINK" href="/car.html" >Car Tool</a>' >> $target ;;
current) echo '<a class="server_LINK" href="/cgi-bin/jpeg.cgi" >Current Screen</a>' >> $target ;;
multicam) echo '<a class="server_LINK" href="/multicam.html" >Multi-Cam Viewer</a>' >> $target ;;
diag) echo '<a class="server_LINK" href="/cgi-bin/diagnostics.cgi" >Diagnostics</a>' >> $target ;;
status) echo '<a class="server_LINK" href="/cgi-bin/status.cgi?test=recording">Check Recording</a>' >> $target ;;
esac
done
echo '<a class="server_LINK" href="/mulitcam.html" >Multi-Cam</a>' >> $target
else
echo 'wz_mini.conf is missing the line WEB_SERVER_OPTIONS <br >';
echo 'to populate it with full capabilities:<pre>WEB_SERVER_OPTIONS="cam config car jpeg multicam diag status"</pre>';
fi
if [[ "$GO2RTC_SERVER_ENABLED" == "true" ]]; then

View File

@ -1,117 +0,0 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides:
# Short-Description: Basic Web Server
# Description: If enabled, start the httpd web server
### END INIT INFO
. /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 '<a class="server_LINK" href="/cgi-bin/cam.cgi" >Wyze Camera Core Config</a>' >> $target ;;
config) echo '<a class="server_LINK" href="/cgi-bin/config.cgi" >Wz Mini Configuration</a>' >> $target ;;
car) echo '<a class="server_LINK" href="/car.html" >Car Tool</a>' >> $target ;;
current) echo '<a class="server_LINK" href="/cgi-bin/jpeg.cgi" >Current Screen</a>' >> $target ;;
multicam) echo '<a class="server_LINK" href="/multicam.html" >Multi-Cam Viewer</a>' >> $target ;;
diag) echo '<a class="server_LINK" href="/cgi-bin/diagnostics.cgi" >Diagnostics</a>' >> $target ;;
status) echo '<a class="server_LINK" href="/cgi-bin/status.cgi?test=recording">Check Recording</a>' >> $target ;;
esac
done
echo '<a class="server_LINK" href="/mulitcam.html" >Multi-Cam</a>' >> $target
else
echo 'wz_mini.conf is missing the line WEB_SERVER_OPTIONS <br >';
echo 'to populate it with full capabilities:<pre>WEB_SERVER_OPTIONS="cam config car jpeg multicam diag status"</pre>';
fi
if [[ "$GO2RTC_SERVER_ENABLED" == "true" ]]; then
echo '<a class="server_LINK" href="#Go2RTC" onclick="javascript:event.target.port=1984">Go2RTC Server</a>' >> $target
fi
echo '<div id="display_BAR"><div class="github_link"><a target="_new" href="https://github.com/gtxaspec/wz_mini_hacks">GitHub: wz_mini_hack</a></div></div>' >> $target
echo '</body></html>' >> $target
}
create_httpdconf()
{
conffile="/opt/wz_mini/etc/httpd.conf"
if [[ -f $conffile ]]; then
rm $conffile
fi
if [[ "$WEB_SERVER_PASSWORD" == "" ]]; then
WEB_SERVER_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
fi
webpassword=$(busybox httpd -m "$WEB_SERVER_PASSWORD")
authline="/:$WEB_SERVER_LOGIN:$webpassword"
cat <<EOF > $conffile
$authline
EOF
}
do_start()
{
create_httpdconf
if [[ "$WEB_SERVER_AUTH" == "false" ]]; then
httpd -p 80 -h /opt/wz_mini/www
echo "httpd enabled"
elif [[ "$WEB_SERVER_AUTH" == "true" ]]; then
httpd -p 80 -h /opt/wz_mini/www -r "Identify yourself:" -c /opt/wz_mini/etc/httpd.conf
echo "httpd enabled"
fi
}
do_stop()
{
#pkill httpd
pidnum=$(ps | egrep "[0-9]{2} httpd -p 80" | awk '{print $1}')
if [[ -z $pidnum ]]; then
echo "httpd was not running"
else
kill $pidnum
echo "httpd killed"
fi
}
if [[ "$WEB_SERVER_ENABLED" == "true" ]]; then
case "$1" in
start)
echo "#####$(basename "$0")#####"
compose_home
do_start
;;
stop)
do_stop
;;
restart)
do_stop
compose_home
do_start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
fi

View File

@ -1 +1 @@
Mon Sep 25 05:05:03 PM PDT 2023
Tue Sep 26 01:38:01 AM PDT 2023

View File

@ -48,8 +48,7 @@ b77697b15e4d6e32e6e2c8c07cbceee2 SD_ROOT/wz_mini/etc/network.d/S04wireguard
720d337f4fd4cecdf63cfbdf5476cc14 SD_ROOT/wz_mini/etc/network.d/S12remoteaccessory
88cd61106fa526f82a812b02aea23ddc SD_ROOT/wz_mini/etc/network.d/S15v4l2rtspserver
d3ac671f88b6d639926b9f5f9a40da6e SD_ROOT/wz_mini/etc/network.d/S01wlanhw
c36d67c69a7e86be6202b2d6e95a63ee SD_ROOT/wz_mini/etc/network.d/S10httpd
758921d3c465ea9ecd578639dd33f774 SD_ROOT/wz_mini/etc/network.d/s10httpd
758921d3c465ea9ecd578639dd33f774 SD_ROOT/wz_mini/etc/network.d/S10httpd
9969970dc82daa31b41730ee460514b0 SD_ROOT/wz_mini/etc/network.d/S03ipv6
edebe65d895650235f05291618814ebe SD_ROOT/wz_mini/etc/network.d/S08hostname
3f025fd89a69b99b0b2e235faf504930 SD_ROOT/wz_mini/etc/network.d/S17go2rtc
@ -193,7 +192,7 @@ b339aee882a5d1c943ad08e4282ec3fd SD_ROOT/wz_mini/usr/bin/iCamera-dbg
b10bdd54c56d8d8de2a27336f17285fe SD_ROOT/wz_mini/usr/bin/patch_icamera.sh
dafffcc1bd1e721d508400686338ceb8 SD_ROOT/wz_mini/usr/bin/imp_helper.sh
580b1b6e91e72b4a4fef7b21d8954403 SD_ROOT/wz_mini/usr/bin/getSensorType
9cd53e75ddb53972ed1e9b40cff120e9 SD_ROOT/wz_mini/usr/bin/app.ver
a063e244bab90ab16fa0781e15250d48 SD_ROOT/wz_mini/usr/bin/app.ver
4c780f0455481d106d47d89f0ae04ed5 SD_ROOT/wz_mini/lib/uClibc.tar
9afeb088e4cbabbe0b04033b560204d0 SD_ROOT/wz_mini/lib/libimp.so
4100755cb6cc6e3b76da20c7e3690e16 SD_ROOT/wz_mini/lib/libalog.so