Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkady23 authored Apr 21, 2021
1 parent 3145792 commit c1fbfc4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
7 changes: 6 additions & 1 deletion yi-hack-v3+/yi-hack-v3/app/_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,24 @@ log(){
echo "$time $@" >> $LOGFILE
}


if [ -f "$LOGFILE" ]; then
L=1
N=$(ls -l $LOGFILE | awk '{ print $5 }')
if [ $N -le 10000 ]; then
exec 2>> $LOGFILE
log "Starting init.sh"
else
rm -f $LOGFILE
fi
else
L=0
fi

$YI_HACK_PREFIX/yi-hack-v3/script/clean_records.sh 2
if [ $L == 1 ] ; then
log "Starting init.sh"
fi

RTSP=$(get_config RTSP)

L1=no
Expand Down
11 changes: 4 additions & 7 deletions yi-hack-v3+/yi-hack-v3/script/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,18 @@ fi
if [ -f "$sd/yi-hack-v3/startup.sh" ]; then
$sd/yi-hack-v3/startup.sh
fi
if [ -f "$sd/etc/wpa_supplicant.conf" ]; then
cp -f $sd/etc/wpa_supplicant.conf /tmp/
fi

if [[ $(get_config DISABLE_CLOUD) == "yes" ]]; then
sleep 20
if [[ $(get_config REC_WITHOUT_CLOUD) == "yes" ]]; then
crond -c $YI_HACK_V3_PREFIX/etc/crontabs
i=0
while [ $i -lt 50 ]; do
N=0
while [ $N -lt 60 ]; do
if [ -f "$sd/record/tmp.mp4.tmp" ]; then
i=50
N=60
fi
sleep 8
i=$(( $i + 1 ))
N=$(($N+1))
done
killall cloudAPI
killall cloud
Expand Down
2 changes: 1 addition & 1 deletion yi-hack-v3+/yi-hack-v3/www/cgi-bin/poweroff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/home/app/script/killapp.sh
killall5
sync
umount -lr /tmp/sd
umount -lr /dev/mmcblk0p1

if [ "$QUERY_STRING" ]; then
reboot
Expand Down

0 comments on commit c1fbfc4

Please sign in to comment.