Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #TMPDIR=`mktemp -d`
- TMPDIR=/tmp/zoom-report
- ZOOM_LOGS=~/.zoom/logs
- rm -rf $TMPDIR
- mkdir $TMPDIR
- sudo lshw > $TMPDIR/lshw.txt
- uname -a > $TMPDIR/uname.txt
- dpkg -l | grep '^ii' > $TMPDIR/dpkg-install-list.txt
- LAST_RUN_ID=$(ls -tr $ZOOM_LOGS | grep cptshare | tail -n 1 | perl -lne '/.*\-(\d+)\-as.*?/; print $1')
- echo "Last run: $LAST_RUN_ID"
- cp $ZOOM_LOGS/cptshare-*${LAST_RUN_ID}* $TMPDIR
- cp $ZOOM_LOGS/zoom_${LAST_RUN_ID}_*.log $TMPDIR
- cp $ZOOM_LOGS/zoom_*_${LAST_RUN_ID}.log $TMPDIR
- CDDIR=$(dirname $TMPDIR)
- TARGET=$CDDIR/zoom-report.tar.gz
- tar -C $CDDIR -czf $TARGET `basename $TMPDIR`
- rm -rf $TMPDIR
- ls -alh $TARGET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement