#!/bin/sh
while :; do
	sleep 1
	[ "$(($(cat /proc/sys/reset)))" = "1" ] && {
		sleep 5
		[ "$(($(cat /proc/sys/reset)))" = "1" ] && {
			echo 4 > /proc/sys/diag
			nvram unset ff_pw unset ff_reset set lan_proto=static set lan_ipaddr=192.168.1.1 set lan_netmask=255.255.255.0 commit
			reboot
		}
	}
done
