update new init scripts

This commit is contained in:
Alfonso Gamboa 2022-07-31 00:47:16 -07:00
parent 0702bb997c
commit 706879da81
36 changed files with 146 additions and 142 deletions

View File

@ -2,19 +2,19 @@
source /opt/wz_mini/wz_mini.conf
echo "replace stock busybox"
echo "Replace stock busybox"
mount --bind /opt/wz_mini/bin/busybox /bin/busybox
echo "replace stock fstab"
echo "Replace stock fstab"
mount --bind /opt/wz_mini/etc/fstab /etc/fstab
echo "replace stock inittab"
echo "Replace stock inittab"
mount --bind /opt/wz_mini/etc/inittab /etc/inittab
echo "bind /etc/profile for local/ssh shells"
echo "Bind /etc/profile for local/ssh shells"
mount --bind /opt/wz_mini/etc/profile /etc/profile
if [ -d /lib/modules ]; then
echo "mount kernel modules"
echo "Mount kernel modules in /lib"
mount --bind /opt/wz_mini/lib/modules /lib/modules
fi

View File

@ -2,11 +2,11 @@
source /opt/wz_mini/wz_mini.conf
echo "mount wz_mini tmpfs"
echo "Mount wz_mini tmpfs"
mount -t tmpfs /opt/wz_mini/tmp
echo "create workspace directory"
echo "Create workspace directory"
mkdir /opt/wz_mini/tmp/.storage
echo "mounting global tmpfs"
echo "Mounting global tmpfs"
mount -t tmpfs /tmp

View File

@ -1,24 +1,5 @@
#!/bin/sh
set -x
case "$1" in
start)
echo "install busybox applets"
echo "Install busybox applets"
mkdir /opt/wz_mini/tmp/.bin
/opt/wz_mini/bin/busybox --install -s /opt/wz_mini/tmp/.bin
;;
stop)
;;
restart|reload)
"$0" stop
"$0" start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

View File

@ -2,17 +2,17 @@
source /opt/wz_mini/wz_mini.conf
set -x
echo "copy stock rcS"
echo "Copy stock rcS"
cp /etc/init.d/rcS /opt/wz_mini/tmp/.storage/rcS
echo "Add verbose debugging to rcS"
sed -i '/^".*/aset -x' /opt/wz_mini/tmp/.storage/rcS
echo "Inject init.d scripts to rcS"
sed -i '/^# Run init script.*/i/opt/wz_mini/etc/rc.d/K01network \&\n' /opt/wz_mini/tmp/.storage/rcS
sed -i '/^# Run init script.*/i/opt/wz_mini/etc/rc.d/K03rcd\n' /opt/wz_mini/tmp/.storage/rcS
echo "Modify Global Paths in rcS"
sed -i '/sbin:/s/$/:\/opt\/wz_mini\/bin/' /opt/wz_mini/tmp/.storage/rcS
sed -i '/system\/\lib/s/$/:\/opt\/wz_mini\/lib/' /opt/wz_mini/tmp/.storage/rcS
@ -35,7 +35,7 @@ if [[ "$DEBUG_ENABLED" == "true" ]]; then
elif [[ "$WEB_CAM_ENABLE" == "true" ]]; then
sed -i '/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
sed -i '/^# Run init/i/opt/wz_mini/etc/rc.d/K02_webcam &' /opt/wz_mini/tmp/.storage/rcS
sed -i '/^# Run init/i/opt/wz_mini/etc/rc.d/K02webcam &' /opt/wz_mini/tmp/.storage/rcS
touch /tmp/dbgflag
elif [[ -d /opt/Upgrade ]]; then
@ -45,7 +45,7 @@ elif [[ -d /opt/Upgrade ]]; then
touch /tmp/dbgflag
fi
##ENABLE LIBCALLBACK BY DEFAULT
echo "Enable libcallback"
if [[ "$LIBCALLBACK_ENABLE" == "true" ]] || ([[ "$RTSP_HI_RES_ENABLED" == "true" ]] || [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]); then
echo "set path for iCamera"
sed -i 's/\/system\/bin\/iCamera/\/opt\/wz_mini\/usr\/bin\/iCamera/g' /opt/wz_mini/tmp/.storage/app_init.sh

View File

@ -2,11 +2,12 @@
source /opt/wz_mini/wz_mini.conf
echo "replace stock password"
echo "Replace stock password"
cp /opt/wz_mini/etc/shadow /opt/wz_mini/tmp/.storage/shadow
if [[ "$DEBUG_PASSWORD" == "true" ]]; then
sed -i 's/:[^:]*/:/' /opt/wz_mini/tmp/.storage/shadow
echo "Remove stock password"
fi
mount --bind /opt/wz_mini/tmp/.storage/shadow /etc/shadow

View File

@ -3,9 +3,9 @@
source /opt/wz_mini/wz_mini.conf
if [ -e /opt/wz_mini/etc/.first_boot ]; then
echo "first boot already completed"
echo "First boot already completed"
else
echo "first boot, initializing"
echo "First boot, initializing"
if [ -f /opt/wz_mini/tmp/.T20 ]; then
#May need different gpio for PANv1
#We don't rmmod this module, as it is marked [permanent] by the kernel on T20
@ -24,4 +24,3 @@ else
echo "Set first_boot"
touch /opt/wz_mini/etc/.first_boot
fi

View File

@ -3,9 +3,6 @@
source /opt/wz_mini/etc/rc.common
source /opt/wz_mini/wz_mini.conf
set -x
## REPLACE STOCK MODULES
if [[ "$ENABLE_RTL8189FS_DRIVER" == "true" ]] || [[ "$ENABLE_RTL8189FS_DRIVER" == "" ]]; then
echo "Enable 8189fs"
if [ -f /opt/wz_mini/tmp/.WYZEC1-JZ ]; then
@ -28,8 +25,8 @@ if [[ "$ENABLE_ATBM603X_DRIVER" == "true" ]] || [[ "$ENABLE_ATBM603X_DRIVER" ==
fi
fi
#Enable serial driver for car
if [ -f /opt/wz_mini/tmp/.CAR ] || [[ "$ENABLE_CAR_DRIVER" == "true" ]]; then
echo "Enable cp210x serial driver for car"
modprobe cp210x
fi
@ -37,26 +34,26 @@ fi
if ([[ "$RTSP_HI_RES_ENABLED" == "true" ]] || [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]) && ! [[ -e /tmp/dbgflag ]]; then
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]] && [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
if [ -f /opt/wz_mini/tmp/.T20 ]; then
echo "load video loopback driver at video6 video7"
echo "Load video loopback driver at video6 video7"
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=6,7
else
echo "load video loopback driver at video1 video2"
echo "Load video loopback driver at video1 video2"
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=1,2
fi
elif [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
if [ -f /opt/wz_mini/tmp/.T20 ]; then
echo "load video loopback driver at video7"
echo "Load video loopback driver at video7"
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=7
else
echo "load video loopback driver at video2"
echo "Load video loopback driver at video2"
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=2
fi
elif [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
if [ -f /opt/wz_mini/tmp/.T20 ]; then
echo "load video loopback driver at video6"
echo "Load video loopback driver at video6"
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=6
else
echo "load video loopback driver at video1"
echo "Load video loopback driver at video1"
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=1
fi
fi
@ -68,9 +65,7 @@ if [[ "$ENABLE_NFSv4" == "true" ]]; then
insmod $KMOD_PATH/kernel/net/dns_resolver/dns_resolver.ko
insmod $KMOD_PATH/kernel/fs/nfs/nfsv4.ko
insmod $KMOD_PATH/kernel/net/sunrpc/auth_gss/auth_rpcgss.ko
echo nfsv4 enabled
else
echo nfsv4 disabled
echo "NFSv4 enabled"
fi
if [[ "$ENABLE_IPTABLES" == "true" ]]; then
@ -80,37 +75,35 @@ if [[ "$ENABLE_IPTABLES" == "true" ]]; then
insmod $KMOD_PATH/kernel/net/ipv4/netfilter/ipt_REJECT.ko
insmod $KMOD_PATH/kernel/net/ipv4/netfilter/iptable_filter.ko
insmod $KMOD_PATH/kernel/net/ipv4/netfilter/iptable_mangle.ko
echo "iptables ipv4 enabled"
echo "iptables IPv4 enabled"
if [[ "$ENABLE_IPV6" == "true" ]]; then
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6_tables.ko
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6t_REJECT.ko
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6table_filter.ko
insmod $KMOD_PATH/kernel/net/ipv6/netfilter/ip6table_mangle.ko
echo "iptables ipv6 enabled"
echo "iptables IPv6 enabled"
fi
else
echo "iptables disabled"
fi
if [[ "$ENABLE_WIREGUARD" == "true" ]]; then
insmod $KMOD_PATH/kernel/net/ipv4/tunnel4.ko
insmod $KMOD_PATH/kernel/net/ipv4/ip_tunnel.ko
insmod $KMOD_PATH/kernel/net/wireguard/wireguard.ko
echo "Wireguard enabled"
fi
if [[ "$ENABLE_CIFS" == "true" ]]; then
insmod $KMOD_PATH/kernel/fs/cifs/cifs.ko
else
echo "cifs disabled"
echo "CIFS enabled"
fi
if [[ "$ENABLE_USB_STORAGE" == "true" ]]; then
insmod $KMOD_PATH/kernel/drivers/scsi/scsi_mod.ko
insmod $KMOD_PATH/kernel/drivers/scsi/sd_mod.ko
insmod $KMOD_PATH/kernel/drivers/usb/storage/usb-storage.ko
else
echo "usb_storage disabled"
echo "usb_storage enabled"
fi
if [[ "$ENABLE_EXT4" == "true" ]]; then
@ -121,9 +114,9 @@ if [[ "$ENABLE_EXT4" == "true" ]]; then
insmod $KMOD_PATH/kernel/fs/jbd2/jbd2.ko
insmod $KMOD_PATH/kernel/fs/mbcache.ko
insmod $KMOD_PATH/kernel/fs/ext4/ext4.ko
echo "ext4 support enabled"
fi
echo "bonding kernel module setup"
if [[ "$BONDING_ENABLED" == "true" ]]; then
if [[ "$BONDING_LINK_MONITORING_FREQ_MS" == "" ]]; then
BONDING_LINK_MONITORING_FREQ_MS="100"
@ -146,4 +139,6 @@ if [[ "$BONDING_ENABLED" == "true" ]]; then
# Insert the bonding driver into the kernel
insmod $KMOD_PATH/kernel/drivers/net/bonding/bonding.ko mode=active-backup miimon="$BONDING_LINK_MONITORING_FREQ_MS" downdelay="$BONDING_DOWN_DELAY_MS" updelay="$BONDING_UP_DELAY_MS" primary="$BONDING_PRIMARY_INTERFACE" fail_over_mac="$BONDING_FAIL_OVER_MAC"
echo "Network bonding enabled"
fi

View File

@ -2,33 +2,33 @@
#CAMERA CONFIGURATION FILES BACKUP
if [ -d /opt/.wz_backup ]; then
echo "backup directory missing"
echo "Factory config backup directory missing"
else
echo "creating backup directory"
echo "Creating factory config backup directory"
mkdir /opt/.wz_backup
fi
if [ -f /opt/wz_mini/tmp/.T31 ]; then
echo "T31 platform backup"
if [ -d /opt/.wz_backup/configs ]; then
echo "configs backup directory present, not backing up again"
echo "Factory configs backup directory present, not backing up again"
else
echo "backup /configs"
echo "Backup /configs"
cp -R /configs/ /opt/.wz_backup/
fi
elif [ -f /opt/wz_mini/tmp/.T20 ]; then
echo "T20 platform backup"
if [ -d /opt/.wz_backup/configs ]; then
echo "configs backup directory present, not backing up again"
echo "Factory configs backup directory present, not backing up again"
else
echo "backup /configs"
echo "Backup /configs"
cp -R /configs/ /opt/.wz_backup/
fi
if [ -d /opt/.wz_backup/params ]; then
echo "configs backup directory present, not backing up again"
echo "Factory params backup directory present, not backing up again"
else
echo "backup /params"
echo "Backup /params"
cp -R /params/ /opt/.wz_backup/
fi
fi

View File

@ -1,8 +1,8 @@
#!/bin/sh
if [ -d /opt/wz_mini/usr/share/terminfo ]; then
echo "terminfo already present"
echo "Terminfo already present"
else
echo "terminfo not present, extract"
echo "Terminfo not present, extract"
tar xf /opt/wz_mini/usr/share/terminfo.tar -C /opt/wz_mini/usr/share/
fi

View File

@ -1,7 +1,7 @@
#!/bin/sh
echo "replace factorycheck with dummy, to prevent bind unmount"
if [ -f /opt/wz_mini/tmp/.T31 ]; then
mount --bind /opt/wz_mini/bin/factorycheck /system/bin/factorycheck
touch /tmp/usrflag
echo "Replace factorycheck with dummy, to prevent bind unmount"
fi

View File

@ -13,9 +13,6 @@ fi
touch -- "$LOG_NAME".log
exec 1> $LOG_NAME.log 2>&1
set -x
echo "welcome to wz_init.sh"
echo "PID $$"

View File

@ -1,7 +1,8 @@
#!/bin/sh
while true
do
#Wait for wlan hardware to be intitialized in app_init.sh, this must be blocking.
while true; do
if ifconfig wlan0 | grep "HWaddr"; then
echo "wlan0 hwaddr is up"
break

View File

@ -2,9 +2,7 @@
source /opt/wz_mini/wz_mini.conf
if [[ "$ENABLE_IPV6" == "true" ]]; then
echo "ipv6 enabled"
else
echo "ipv6 disabled"
if ! [[ "$ENABLE_IPV6" == "true" ]]; then
sysctl -w net.ipv6.conf.all.disable_ipv6=1
echo "ipv6 disabled"
fi

View File

@ -8,7 +8,7 @@ if [[ "$ENABLE_WIREGUARD" == "true" ]]; then
if [[ "$WIREGUARD_IPV4" != "" ]]; then
if [ -d /opt/wz_mini/etc/wireguard ]; then
echo "wireguard dir exists"
echo "Wireguard dir exists"
else
mkdir -p /opt/wz_mini/etc/wireguard
fi
@ -28,5 +28,5 @@ if [[ "$ENABLE_WIREGUARD" == "true" ]]; then
/opt/wz_mini/bin/busybox ip route add "$WIREGUARD_PEER_ALLOWED_IPS" dev wg0
fi
else
echo "wireguard disabled"
echo "Wireguard disabled"
fi

View File

@ -2,5 +2,5 @@
source /opt/wz_mini/wz_mini.conf
echo "set hostname to $CUSTOM_HOSTNAME"
echo "Set hostname to $CUSTOM_HOSTNAME"
hostname $CUSTOM_HOSTNAME

View File

@ -6,5 +6,6 @@ if [[ "$ENABLE_LOCAL_DNS" == "true" ]]; then
dnsmasq -C /opt/wz_mini/etc/dnsmasq.conf
rm -f /tmp/resolv.conf
cp /opt/wz_mini/etc/resolv.conf /tmp/resolv.conf
echo "dnsmasq enabled"
fi

View File

@ -4,5 +4,6 @@ source /opt/wz_mini/wz_mini.conf
if [[ "$WEB_SERVER_ENABLED" == "true" ]]; then
httpd -p 80 -h /opt/wz_mini/www
echo "httpd enabled"
fi

View File

@ -4,6 +4,6 @@ source /opt/wz_mini/etc/rc.common
wait_for_wlan_ip
echo "store original mac"
cat /sys/class/net/wlan0/address | tr '[:lower:]' '[:upper:]' > /opt/wz_mini/tmp/wlan0_mac
echo "store original mac"

View File

@ -14,9 +14,11 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
RTSP_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
fi
echo "Enable video ch 0"
/opt/wz_mini/bin/cmd video 0 on
if [[ "$RTSP_HI_RES_ENABLE_AUDIO" == "true" ]]; then
echo "Enable audio ch 0"
/opt/wz_mini/bin/cmd audio 0 on
AUDIO_CH="-C 1"
AUDIO_FMT="-a S16_LE"
@ -40,6 +42,7 @@ if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
LOW_VIDEO_DEV="/dev/video2"
fi
echo "Enable video ch 1"
/opt/wz_mini/bin/cmd video 1 on
if [[ "$RTSP_PASSWORD" = "" ]]; then
@ -47,6 +50,7 @@ if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
fi
if [[ "$RTSP_LOW_RES_ENABLE_AUDIO" == "true" ]]; then
echo "Enable video ch 1"
/opt/wz_mini/bin/cmd audio 1 on
AUDIO_CH="-C 1"
AUDIO_FMT="-a S16_LE"

View File

@ -26,8 +26,7 @@ while true; do
if ifconfig wlan0 | grep "$CONFIG"; then
break
fi
echo " network not ready yet, try again in 5"
echo "Network not ready yet, try again in 5 seconds"
sleep 5
done
}
@ -37,8 +36,7 @@ while true; do
if ifconfig wlan0 | grep "inet addr"; then
break
fi
echo " network not ready yet, try again in 5"
echo "IP Address not aquired yet, try again in 5 seconds"
sleep 5
done
}

View File

@ -5,9 +5,6 @@ source /opt/wz_mini/wz_mini.conf
wait_for_wlan
# Start all init scripts in /etc/init.d
# executing them in numerical order.
#
for i in /opt/wz_mini/etc/network/S??* ;do
# Ignore dangling symlinks (if any).
@ -53,9 +50,12 @@ done
if [ -f "$CUSTOM_SCRIPT_PATH" ]; then
echo "starting custom script"
echo "Starting custom script"
$CUSTOM_SCRIPT_PATH &
else
echo "no custom script configured in wz_mini.conf"
echo "No custom script configured in wz_mini.conf"
fi
/opt/wz_mini/etc/rc.d/K15logging
echo "wz_mini done" > /dev/kmsg

View File

@ -16,8 +16,6 @@ export WZMINI_CFG=/opt/wz_mini/wz_mini.conf
[ -f $WZMINI_CFG ] && source $WZMINI_CFG
set -x
echo "welcome to wz_cam.sh"
echo "PID $$"

View File

@ -1,8 +1,5 @@
#!/bin/sh
# Start all init scripts in /etc/init.d
# executing them in numerical order.
#
for i in /opt/wz_mini/etc/rc.d/S??* ;do
# Ignore dangling symlinks (if any).

View File

@ -0,0 +1,23 @@
#!/bin/sh
source /opt/wz_mini/wz_mini.conf
echo "Store dmesg logs"
DMESG_LOG=/opt/wz_mini/log/dmesg
if [[ -e $DMESG_LOG.log || -L $DMESG_LOG.log ]] ; then
i=0
while [[ -e $DMESG_LOG.log.$i || -L $DMESG_LOG.log.$i ]] ; do
let i++
done
mv $DMESG_LOG.log $DMESG_LOG.log.$i
DMESG_LOG=$DMESG_LOG
fi
touch -- "$DMESG_LOG".log
dmesg > $DMESG_LOG.log 2>&1
echo "Deleting logs older than 5 boots..."
find /opt/wz_mini/log -name '*log*' | while read file; do
[ "${file#/opt/wz_mini/log/*log.}" -gt 5 ] && rm -v "$file"
done

View File

@ -10,18 +10,18 @@ if [ -e /opt/wz_mini/swap.gz ]; then
/opt/wz_mini/bin/audioplay_t31 /opt/wz_mini/usr/share/audio/swap.wav $AUDIO_PROMPT_VOLUME
rmmod audio
fi
echo "swap archive present, extracting"
echo "Swap archive present, extracting"
gzip -d /opt/wz_mini/swap.gz
mkswap /opt/wz_mini/swap
sync;echo 3 > /proc/sys/vm/drop_caches
else
echo "swap archive missing, not extracting"
echo "Swap archive missing, not extracting"
fi
#SWAP FILE, REQUIRED FOR OPERATION!
#SWAP FILE IS REQUIRED FOR OPERATION!
if [[ "$ENABLE_SWAP" == "true" ]] && [[ -e /opt/wz_mini/swap ]]; then
echo "swap file found, enable"
echo "Swap file found, enable"
/opt/wz_mini/bin/busybox swapon /opt/wz_mini/swap
else
echo "swap file missing"
echo "Swap file missing"
fi

View File

@ -6,7 +6,6 @@ source /opt/wz_mini/wz_mini.conf
if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
HOST_MACADDR=$(echo "$CUSTOM_HOSTNAME"|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
if [ -f /opt/wz_mini/tmp/.T20 ]; then
echo connect > /sys/devices/platform/jz-dwc2/dwc2/udc/dwc2/soft_connect
sleep 1
@ -30,6 +29,9 @@ if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
insmod $KMOD_PATH/kernel/drivers/usb/gadget/g_ncm.ko iManufacturer=wz_mini_ncm host_addr="$HOST_MACADDR" dev_addr="$USB_DIRECT_MAC_ADDR"
echo "USB Direct enabled"
else
echo "USB Direct disabled"
fi

View File

@ -13,6 +13,9 @@ if [[ "$ENABLE_USB_RNDIS" == "true" ]]; then
insmod $KMOD_PATH/kernel/drivers/net/usb/rndis_host.ko
fi
echo "USB RNDIS enabled"
else
echo "usb rndis disabled"
echo "USB RNDIS disabled"
fi

View File

@ -12,7 +12,7 @@ if ! [[ "$BONDING_ENABLED" == "true" ]]; then
if [[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]] || [[ "$ENABLE_USB_RNDIS" == "true" ]]; then
##Fool iCamera by renaming the hardline interface to wlan0
echo "renaming interfaces"
echo "Renaming interfaces"
ifconfig $ALT_IFACE down
ifconfig wlan0 down
/opt/wz_mini/bin/busybox ip link set wlan0 name wlanold
@ -30,7 +30,7 @@ if ! [[ "$BONDING_ENABLED" == "true" ]]; then
fi
else
echo "no alt iface enabled"
echo "No alternate iface enabled"
fi
fi
}

View File

@ -48,10 +48,9 @@ wait_for_wlan
# Name the bonding interface to be the "new" wlan0 interface
/opt/wz_mini/bin/busybox ip link set bond0 name wlan0
# Bring the newly renamed wlan0 (actually the bond interface) back up
# Bring the newly renamed wlan0 (actually the bond interface) back up in the next step
##Run DHCP client, and bind mount our fake wpa_cli.sh to fool iCamera
#Run the DHCP client, and bind mount our fake wpa_cli.sh to fool iCamera
ifconfig wlan0 up
pkill udhcpc
udhcpc -i wlan0 -x hostname:$CUSTOM_HOSTNAME -p /var/run/udhcpc.pid -b

View File

@ -9,6 +9,7 @@ if [[ "$DISABLE_FW_UPGRADE" == "true" ]]; then
#echo -e "127.0.0.1 localhost \n127.0.0.1 wyze-upgrade-service.wyzecam.com" > /opt/wz_mini/tmp/.storage/hosts
#mount --bind /opt/wz_mini/tmp/.storage/hosts /etc/hosts
/opt/wz_mini/bin/busybox inotifyd /opt/wz_mini/usr/bin/watch_up.sh /tmp:n > /dev/null 2>&1 &
echo "Firmware updates disabled"
else
mkdir /tmp/Upgrade
/opt/wz_mini/bin/busybox inotifyd /opt/wz_mini/usr/bin/watch_up.sh /tmp:n > /dev/null 2>&1 &

View File

@ -4,7 +4,7 @@ source /opt/wz_mini/wz_mini.conf
if [[ "$REMOTE_SPOTLIGHT" == "true" ]]; then
/opt/wz_mini/bin/socat pty,link=/dev/ttyUSB0,raw tcp:"$REMOTE_SPOTLIGHT_HOST":9000 &
echo "remote accessory enabled"
echo "Remote accessory support enabled"
else
echo "remote accessory disabled"
echo "Remote accessory support disabled"
fi

View File

@ -10,5 +10,5 @@ if [[ "$ENABLE_MP4_WRITE" == "true" ]]; then
echo "mp4_write enabled"
fi
else
echo "mp4 write disabled"
echo "mp4_write disabled"
fi

View File

@ -3,5 +3,6 @@
source /opt/wz_mini/wz_mini.conf
if [[ "$NIGHT_DROP_DISABLE" == "true" ]]; then
echo "Night Drop Disable, Enabled"
touch /opt/wz_mini/tmp/.nd
fi

View File

@ -2,7 +2,6 @@
source /opt/wz_mini/wz_mini.conf
#MOTORIZED CAMERA CONTROL
if [[ "$DISABLE_MOTOR" == "true" ]]; then
echo "Motor Disabled"
touch /opt/wz_mini/tmp/.ms

View File

@ -0,0 +1,5 @@
#!/bin/sh
#This file executes last, after rc.local.d/