lineage_device_tree_xcoverpro/rootdir/bin/mx_logger.sh

24 lines
374 B
Bash
Raw Permalink Normal View History

2023-06-18 22:49:28 +00:00
#!/vendor/bin/sh
DIR=/data/exynos/log/wifi
PIDFILE=${DIR}/mxlogger.pid
MXPROG=mxlogger
if [ ! -d ${DIR} ]; then
mkdir -p ${DIR}
fi
if [ -f $PIDFILE ]; then
pidn="`cat $PIDFILE`"
exe_name="`readlink /proc/${pidn}/exe`"
echo "$exe_name" | grep -q $MXPROG
# Avoiding innocent victims
[ x"$?" == "x0" ] && kill -9 $pidn
fi
mx_logger_dump.sh
$MXPROG -d ${DIR}
exit 0