mcchas / g2h-camera-mods

Modifying the G2H camera with rtsp, security and not to call home
MIT License
107 stars 14 forks source link

Can you make a script to restore your changes #22

Closed stelin66 closed 2 years ago

stelin66 commented 2 years ago

Can you make a script to reverse it to back factory mode again or can it be restored/downgrade with the ota file manually

stelin66 commented 2 years ago

Find it, you had left a copy of your change files in /etc deleted normal.xml och tar_app.sh and patched restored normal.xml_save to normal.xml and tar_app.sh_save to tar_app.sh and all back to normal again, the reason for all this is that my IR was on all time at RTSP streaming,

ads1230 commented 2 years ago
#!/bin/sh

# check if already running
test -f /tmp/plock && exit

# create lock file
echo 1 > /tmp/plock

# change root password
echo "root:password" | chpasswd 

test -f /etc/tar_app.sh_save && cp /etc/tar_app.sh_save /etc/tar_app.sh && rm -r /etc/tar_app.sh_save

test -f /etc/normal.xml_save && cp /etc/normal.xml_save /etc/normal.xml && rm -r /etc/normal.xml_save

if [ ! -f /etc/patched ] ; then
  echo 1 > /etc/patched
  reboot
fi