mirror of
https://github.com/egor-white/zaprett.git
synced 2026-01-25 12:09:43 +05:00
fix autostart
This commit is contained in:
@@ -17,12 +17,8 @@ unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2
|
||||
ui_print "Creating zaprett directory..."
|
||||
mkdir /sdcard/zaprett; mkdir /sdcard/zaprett/lists; mkdir /sdcard/zaprett/bin; mkdir /sdcard/zaprett/strategies;
|
||||
|
||||
ui_print "Removing old config (config structure changed)..."
|
||||
rm -f /sdcard/zaprett/config
|
||||
|
||||
ui_print "Filling configuration file if not exist..."
|
||||
if [ ! -f "/sdcard/zaprett/config" ]; then
|
||||
echo start_on_boot=true > /sdcard/zaprett/config
|
||||
echo active_lists=/storage/emulated/0/zaprett/lists/list-youtube.txt >> /sdcard/zaprett/config
|
||||
echo active_exclude_lists= >> /sdcard/zaprett/config
|
||||
echo list_type=whitelist
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#!/system/bin/sh
|
||||
while [ -z "$(getprop sys.boot_completed)" ]; do sleep 2; done
|
||||
sleep 15
|
||||
source /storage/emulated/0/zaprett/config
|
||||
if [ "$autorestart" = "true" ]; then
|
||||
if [ -f "/data/adb/modules/zaprett/autostart" ]; then
|
||||
su -c "zaprett start"
|
||||
while true; do
|
||||
sleep 3600
|
||||
su -c "zaprett restart"
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user