Skip to content

Commit 9d4fa70

Browse files
authored
Create .status.sh
1 parent d3ac0e5 commit 9d4fa70

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.status.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
MODULE_DIR="/data/adb/modules/YetAnotherBootloopProtector"
2+
SYSTEMUI_MONITOR_DISABLE="/data/adb/systemui.monitor.disable"
3+
MODULE_PROP="$MODULE_DIR/module.prop"
4+
REQUIRED_FILES="\
5+
$MODULE_DIR/action.sh \
6+
$MODULE_DIR/service.sh \
7+
$MODULE_DIR/post-fs-data.sh \
8+
$MODULE_DIR/uninstall.sh"
9+
10+
for file in $REQUIRED_FILES; do
11+
if [ ! -f "$file" ]; then
12+
sed -i '/^description=/d' "$MODULE_PROP"
13+
echo "description= Module is corrupted. Please reinstall." >> "$MODULE_PROP"
14+
exit 0
15+
fi
16+
done
17+
18+
if [ -f "$SYSTEMUI_MONITOR_DISABLE" ] && [ -f "$MODULE_DIR/disable" ]; then
19+
sed -i '/^description=/d' "$MODULE_PROP"
20+
echo "description= SystemUI Monitor ❌ | Bootloop Monitor ❌ | Module is enabled ❌" >> "$MODULE_PROP"
21+
elif [ -f "$SYSTEMUI_MONITOR_DISABLE" ]; then
22+
sed -i '/^description=/d' "$MODULE_PROP"
23+
echo "description= SystemUI Monitor ❌ | Bootloop Monitor ✅ | Module is enabled? ✅" >> "$MODULE_PROP"
24+
else
25+
sed -i '/^description=/d' "$MODULE_PROP"
26+
echo "description= SystemUI Monitor ✅ | Bootloop Monitor ✅ | module is enabled? ✅" >> "$MODULE_PROP"
27+
fi

0 commit comments

Comments
 (0)