diff --git a/service.sh b/service.sh index 29b64697a2e6a3241477553648b9eef95a3bff5f..310bdc7d648ff4b17aaca1f2e77187754fc4b18f 100644 --- a/service.sh +++ b/service.sh @@ -10,6 +10,8 @@ do sleep 1s done +MODDIR=${0%/*} + GetBusyBox="none" GetBusyBoxPath="none" for i in /system/xbin /system/bin /sbin /su/xbin /data/adb/modules/busybox-ndk/system/xbin /data/adb/modules_update/busybox-ndk/system/xbin /data/adb/modules/busybox-ndk/system/bin /data/adb/modules_update/busybox-ndk/system/bin /data/adb/ksu/bin /data/adb/magisk; do @@ -44,8 +46,8 @@ TotalTime="30" for GetTime in 5 5 5 5 1 1 1 1 1 1 1 1 1 1 do - echo "modules will run after $TotalTime s" > $ModulPath/system/etc/ZyC-Core/info/logs.log - echo "modules will run after $TotalTime s" > $ModulPath/system/etc/ZyC-Core/info/logs_error.log + echo "modules will run after $TotalTime s" > $MODDIR/system/etc/ZyC-Core/info/logs.log + echo "modules will run after $TotalTime s" > $MODDIR/system/etc/ZyC-Core/info/logs_error.log $GetBusyBox sleep ${GetTime}s TotalTime=$(($TotalTime-$GetTime)) done @@ -56,7 +58,7 @@ LetsRunService(){ $GetBusyBox sh $data "$ARGS" & } -LetsRunService $ModulPath/system/etc/ZyC-Core/core.sh "BOOTmode='1' ModulPath='$(cat /system/etc/ZyC-Core/info/magisk_path)/$MiD'" -if [[ -f $ModulPath/system/etc/ZyC-Core/misc/generate-fps.sh ]] && [[ "$(cat $ModulPath/system/etc/ZyC-Core/configs/get_fps_service.conf)" == "1" ]];then - LetsRunService $ModulPath/system/etc/ZyC-Core/misc/generate-fps.sh +LetsRunService $MODDIR/system/etc/ZyC-Core/core.sh "BOOTmode='1' ModulPath='$(cat /system/etc/ZyC-Core/info/magisk_path)/$MiD'" +if [[ -f $MODDIR/system/etc/ZyC-Core/misc/generate-fps.sh ]] && [[ "$(cat $MODDIR/system/etc/ZyC-Core/configs/get_fps_service.conf)" == "1" ]];then + LetsRunService $MODDIR/system/etc/ZyC-Core/misc/generate-fps.sh fi \ No newline at end of file