9ce6bbd92a
* new init system * update new init scripts * update checksum * fix broken audio promps with new init scripts * fix debug/upgrade mode * fix bonding and eth0 hw addr * add checksum * fix bonding setup * add rtsp auth disable * adjust network init scripts path * recreated repo and re added cron scripts (#211) * recreated repo and re added cron scripts * rename cron script and move it to the right folder. * Delete .vs directory remove .vs directory * add deubg message to bonding rc.d script * add crontab variable to wz_mini.conf * fix mp4write * add syslog debug feature * fix syslog init blocking * fix syslog save function * increase imp_helper rerun delay * update init scripts * fix bonding and usb-direct * update checksum * add netmon for bonding * fix supervisor function * update model detection * fix debugging injection on T20 devices Co-authored-by: sideup66 <47700565+sideup66@users.noreply.github.com>
24 rivejä
526 B
Bash
24 rivejä
526 B
Bash
#!/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
|