1
0
mirror of https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git synced 2025-09-02 20:52:41 +02:00

Root CA updates and more cron fixes (#1726)

* Fix source of missing cron directories

At some point, the root crontab was added to the git source, but the
original script that added them was not updated to reflect.

* Update root ca and updater
This commit is contained in:
Will Freeman
2021-04-29 09:14:39 -06:00
committed by GitHub
parent 799c2a4b70
commit 1090a1f626
3 changed files with 627 additions and 762 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,6 @@
# We don't mind you downloading the PEM file from us in an automated fashion,
# but please don't do it more often than once per day. It is only updated once
# every few months anyway.
# ABOUT: https://curl.haxx.se/docs/caextract.html
# ABOUT: https://curl.se/docs/caextract.html
curl --remote-name --time-cond cacert.pem https://curl.haxx.se/ca/cacert.pem
curl --remote-name --time-cond cacert.pem https://curl.se/ca/cacert.pem

View File

@@ -85,26 +85,15 @@ if [ ! "$SWAP_ZRAM" = false ]; then
swapon -p 20 /dev/zram0
fi
## Create crontab dir and start crond:
if [ ! -d /system/sdcard/config/cron ]; then
mkdir -p ${CONFIGPATH}/cron/crontabs
CRONPERIODIC="${CONFIGPATH}/cron/periodic"
echo ${CONFIGPATH}/cron/crontabs/periodic
# Wish busybox sh had brace expansion...
## Create cron periodic dirs and start crond:
CRONPERIODIC="${CONFIGPATH}/cron/periodic"
if [ ! -d $CRONPERIODIC ]; then
mkdir -p ${CRONPERIODIC}/15min \
${CRONPERIODIC}/hourly \
${CRONPERIODIC}/daily \
${CRONPERIODIC}/weekly \
${CRONPERIODIC}/monthly
cat > ${CONFIGPATH}/cron/crontabs/root <<EOF
# min hour day month weekday command
*/15 * * * * busybox run-parts ${CRONPERIODIC}/15min
0 * * * * busybox run-parts ${CRONPERIODIC}/hourly
0 2 * * * busybox run-parts ${CRONPERIODIC}/daily
0 3 * * 6 busybox run-parts ${CRONPERIODIC}/weekly
0 5 1 * * busybox run-parts ${CRONPERIODIC}/monthly
EOF
echo "Created cron directories and standard interval jobs" >> $LOGPATH
echo "Created cron periodic directories" >> $LOGPATH
fi
/system/sdcard/bin/busybox crond -L /system/sdcard/log/crond.log -c /system/sdcard/config/cron/crontabs