2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-22 01:37:40 +00:00
NanoDroid/Full/common/service.sh

22 lines
662 B
Bash
Raw Normal View History

2018-01-23 20:11:52 +00:00
#!/system/bin/sh
# Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/...
# This will make your scripts compatible even if Magisk change its mount point in the future
MODDIR=${0%/*}
# Create private Log directory
LOGDIR="${MODDIR}"/.logs
2018-02-08 19:52:57 +00:00
[[ ! -d ${LOGDIR} ]] && mkdir -p "${LOGDIR}"
2018-01-23 20:11:52 +00:00
# Set current date in 20170607-12.07.25 format
CURDATE=$(date +%Y%m%d-%I.%M.%S)
# This script will be executed in late_start service mode
# More info in the main Magisk thread
for init in fstrim logscleaner sqlite external_sd permissions; do
"${MODDIR}/init.d/${init}" | \
tee -a "${LOGDIR}/${init}.log.${CURDATE}" &
done
2018-02-08 19:52:57 +00:00
2018-02-09 16:09:41 +00:00
"${MODDIR}/init.d/logcat" &