guino / Merkury1080P

Merkury1080P (CW017) Rooting and Customization
78 stars 16 forks source link

Mini 16s #23

Open sanscorp1 opened 2 years ago

sanscorp1 commented 2 years ago

I was afraid it wouldn't take long for my next question :) Previous issues were about the Outdoor camera (bullet).

This is about the indoor mini 16S camera (1080). I have been able to telnet into the camera and enable RTSP in the tuya_config.json file, the RTSP stream works.

I now want to apply the hosts file hack via custom.sh but the camera stays online. Below is the file I'm using now and the host file is in the root of the SD.

Is the custom.sh edited correctly and can I try something else?

#!/bin/sh
if [ ! -e /tmp/customrun ]; then
 echo custom > /tmp/customrun
 cp /mnt/mmc01/passwd /etc/passwd
 /mnt/mmc01/busybox telnetd
 /mnt/mmc01/busybox httpd -c /mnt/mmc01/httpd.conf -h /mnt/mmc01 -p 8080
 if [ -e /mnt/mmc01/ppsapp ]; then
  PPSID=$(ps | grep -v grep | grep ppsapp | awk '{print $1}')
  kill $PPSID
  /mnt/mmc01/set record_enable 0
  #/mnt/mmc01/set enable_event_record 1
  /mnt/mmc01/ppsapp &
  if [ -e /mnt/mmc01/hosts ]; then
   sleep 180
   cp /mnt/mmc01/hosts /etc
   ifconfig wlan0 down
   sleep 120
   ifconfig wlan0 up
  fi
 fi
fi