mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2025-07-04 02:09:48 +00:00
Updated to integrate cron autostart with the stock wz_mini.conf file as well as eliminated the old DNS solution.
This commit is contained in:
parent
9297121a98
commit
1059a4d0c8
BIN
.vs/slnx.sqlite
BIN
.vs/slnx.sqlite
Binary file not shown.
Binary file not shown.
@ -595,6 +595,11 @@ if [[ "$WEB_SERVER_ENABLED" == "true" ]]; then
|
|||||||
httpd -p 80 -h /opt/wz_mini/www
|
httpd -p 80 -h /opt/wz_mini/www
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$ENABLE_CRON" == "true" ]]; then
|
||||||
|
until ping -c1 www.google.com >/dev/null 2>&1; do :; done
|
||||||
|
/opt/wz_mini/tmp/.bin/crond -b -c /opt/wz_mini/etc/crontab/
|
||||||
|
fi
|
||||||
|
|
||||||
hostname_set
|
hostname_set
|
||||||
touch /opt/wz_mini/tmp/.wz_user_firstrun
|
touch /opt/wz_mini/tmp/.wz_user_firstrun
|
||||||
pkill -f dumpload #Kill dumpload so it won't waste cpu or ram gathering cores and uploading them when something crashes
|
pkill -f dumpload #Kill dumpload so it won't waste cpu or ram gathering cores and uploading them when something crashes
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
##Verify the network is up before continuing
|
|
||||||
until ping -c1 www.google.com >/dev/null 2>&1; do :; done
|
|
||||||
FILE=/tmp/test_hosts
|
|
||||||
if test -f "$FILE"; then
|
|
||||||
#We just need to clear and re generate. rebuilding the file is kinda pointless and script may be used on long running cameras.
|
|
||||||
true > /tmp/test_hosts
|
|
||||||
echo 127.0.0.1 localhost >>/tmp/test_hosts
|
|
||||||
dns=$(cat /etc/resolv.conf | egrep -o '([0-9]{1,3}\.){3}[0-9]{1,3}' | head -1)
|
|
||||||
server=$(nslookup c1ybkrkbr1j10x.credentials.iot.us-west-2.amazonaws.com $dns | awk -F': ' 'NF==2 { print $2 } ' | head -1)
|
|
||||||
echo $server c1ybkrkbr1j10x.credentials.iot.us-west-2.amazonaws.com >>/tmp/test_hosts
|
|
||||||
else
|
|
||||||
#generate the file and mount
|
|
||||||
touch /tmp/test_hosts
|
|
||||||
echo 127.0.0.1 localhost >>/tmp/test_hosts
|
|
||||||
dns=$(cat /etc/resolv.conf | egrep -o '([0-9]{1,3}\.){3}[0-9]{1,3}' | head -1)
|
|
||||||
server=$(nslookup c1ybkrkbr1j10x.credentials.iot.us-west-2.amazonaws.com $dns | awk -F': ' 'NF==2 { print $2 } ' | head -1)
|
|
||||||
echo $server c1ybkrkbr1j10x.credentials.iot.us-west-2.amazonaws.com >>/tmp/test_hosts
|
|
||||||
mount --bind /tmp/test_hosts /etc/hosts
|
|
||||||
fi
|
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
##Verify the network is up before continuing
|
|
||||||
until ping -c1 www.google.com >/dev/null 2>&1; do :; done
|
|
||||||
/opt/wz_mini/tmp/.bin/crond -b -c /opt/wz_mini/etc/crontab/
|
|
@ -80,6 +80,7 @@ DISABLE_MOTOR="false"
|
|||||||
ENABLE_FSCK_ON_BOOT="false"
|
ENABLE_FSCK_ON_BOOT="false"
|
||||||
ENABLE_CAR_DRIVER="false"
|
ENABLE_CAR_DRIVER="false"
|
||||||
ENABLE_LOCAL_DNS="false"
|
ENABLE_LOCAL_DNS="false"
|
||||||
|
ENABLE_CRON="false"
|
||||||
|
|
||||||
#####DEBUG#####
|
#####DEBUG#####
|
||||||
#drops you to a shell via serial, doesn't load app_init.sh
|
#drops you to a shell via serial, doesn't load app_init.sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user