mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-22 05:27:24 +00:00
stop log spamming for watch_up.sh
This commit is contained in:
parent
64455f5a44
commit
2cd78e0bc2
@ -1,16 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
LOG_NAME=/opt/wz_mini/log/watch_up
|
||||
if [[ -e $LOG_NAME.log || -L $LOG_NAME.log ]] ; then
|
||||
i=0
|
||||
while [[ -e $LOG_NAME.log.$i || -L $LOG_NAME.log.$i ]] ; do
|
||||
let i++
|
||||
done
|
||||
mv $LOG_NAME.log $LOG_NAME.log.$i
|
||||
LOG_NAME=$LOG_NAME
|
||||
DEBUG=false
|
||||
|
||||
if [ "$DEBUG" == "true" ]; then
|
||||
|
||||
if [ -L /dev/fd ]; then
|
||||
echo fd exists
|
||||
else
|
||||
echo fd does not exist, link
|
||||
ln -s /proc/self/fd /dev/fd
|
||||
fi
|
||||
|
||||
LOG_FILE=/opt/wz_mini/log/watch_up.log
|
||||
exec > >(busybox tee -a ${LOG_FILE}) 2>&1
|
||||
fi
|
||||
touch -- "$LOG_NAME".log
|
||||
exec 1> $LOG_NAME.log 2>&1
|
||||
|
||||
set -x
|
||||
|
||||
|
2
file.chk
2
file.chk
@ -64,7 +64,7 @@ e2e7f9190edcfb31af42fb00c59919ab SD_ROOT/wz_mini/usr/share/audio/upgrade_mode_v
|
||||
eaf86f91cb1b15b2191a8845ae88e3c8 SD_ROOT/wz_mini/usr/share/audio/init_v2.wav
|
||||
02fed0e4b2382d839f630ce0477aba26 SD_ROOT/wz_mini/usr/share/audio/init.wav
|
||||
2f055470bf862f8ddaf2a0c2d55fc46d SD_ROOT/wz_mini/usr/bin/iCamera
|
||||
df71296985782eb0c111a95f36aa4648 SD_ROOT/wz_mini/usr/bin/watch_up.sh
|
||||
cf049b9446094cc8a7e07a33cf91c4a8 SD_ROOT/wz_mini/usr/bin/watch_up.sh
|
||||
b339aee882a5d1c943ad08e4282ec3fd SD_ROOT/wz_mini/usr/bin/iCamera-dbg
|
||||
20b061689308b2cee7edf3b9b906bca7 SD_ROOT/wz_mini/usr/bin/ucamera
|
||||
69d727b25bbd22fb61f1cc0b5a063acb SD_ROOT/wz_mini/usr/bin/upgrade-run.sh
|
||||
|
Loading…
Reference in New Issue
Block a user