Skip to content

Commit 880da39

Browse files
committed
module/install.sh: Skip already disabled conflicting module
1 parent 93d251b commit 880da39

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

module/common/install.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,21 @@ if [ "$DO_WE_REALLY_NEED_ADDONS" == "true" ]; then
8181
fi
8282
fi
8383

84-
# check for conflicts
84+
# Check for conflicts
8585
pm list packages | grep -q org.adaway && abort "- Adaway is detected, Please disable to prevent conflicts."
8686

8787
for module in /data/adb/modules/*; do
88-
module_id="$(grep_prop id ${module}/module.prop)"
88+
module_id="$(grep_prop id "${module}/module.prop")"
8989
# Skip our own module
9090
[ "$module_id" == "Re-Malwack" ] && continue
9191

9292
# Check for conflict by looking for a hosts file in the module
9393
if [ -f "${module}/system/etc/hosts" ]; then
94-
module_name="$(grep_prop name ${module}/module.prop)"
94+
# Check if the module is already disabled
95+
if [ -f "/data/adb/modules/$module_id/disable" ]; then
96+
continue
97+
fi
98+
module_name="$(grep_prop name "${module}/module.prop")"
9599
ui_print "- Disabling conflicting module: $module_name"
96100
touch "/data/adb/modules/$module_id/disable"
97101
fi

0 commit comments

Comments
 (0)