diff --git a/box/scripts/ctr.inotify b/box/scripts/ctr.inotify index b4718eb..96c43b3 100755 --- a/box/scripts/ctr.inotify +++ b/box/scripts/ctr.inotify @@ -113,6 +113,7 @@ check_module_service() { done if [ -n "$current_ip" ]; then + echo "-- Notifikasi LOG --" > "$log_file" log_msg "--- Network state change: WiFi connected ---" log_msg "SSID: ${ssid}, IP: ${current_ip}" echo "ssid:${ssid}" > "$last_wifi_state_file" diff --git a/box_service.sh b/box_service.sh index 97d3677..bba1115 100755 --- a/box_service.sh +++ b/box_service.sh @@ -1,14 +1,14 @@ #!/system/bin/sh ( - until [ $(getprop init.svc.bootanim) = "stopped" ]; do + until [ "$(getprop init.svc.bootanim)" = "stopped" ]; do sleep 10 done if [ -f "/data/adb/box/scripts/start.sh" ]; then - chmod 755 /data/adb/box/scripts/* - /data/adb/box/scripts/start.sh + chmod -R 755 /data/adb/box/scripts/ + /data/adb/box/scripts/start.sh >/dev/null 2>&1 else - echo "File '/data/adb/box/scripts/start.sh' not found" + echo "File /data/adb/box/scripts/start.sh not found" > "/data/adb/box/run/box_service.log" fi -)& \ No newline at end of file +) & \ No newline at end of file diff --git a/customize.sh b/customize.sh index aeb0379..eb90e27 100644 --- a/customize.sh +++ b/customize.sh @@ -113,10 +113,10 @@ find_bin() { local path="$bin_dir/bin/$name" if [ -e "$path" ]; then ui_print "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" - ui_print "📦 $name → ⭕ FOUND" + ui_print "— $name → ⭕ FOUND" else ui_print "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" - ui_print "📦 $name → ❌ NOT FOUND" + ui_print "— $name → ❌ NOT FOUND" fi } @@ -155,7 +155,7 @@ find_bin() { } # List of binaries to check - for bin in sing-box v2fly xray curl yq hysteria; do + for bin in yq curl sing-box v2fly xray hysteria; do timeout 1 getevent -cl >/dev/null check_bin "$bin" @@ -163,19 +163,20 @@ find_bin() { ui_print "— [ Vol UP(+): Yes ]" ui_print "— [ Vol DOWN(-): No ]" handle_download "$bin" + sleep 1 done # Special case for clash if [ -e "$bin_dir/bin/xclash/mihomo" ]; then ui_print "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" - ui_print "📦 mihomo → ⭕ FOUND" + ui_print "— mihomo → ⭕ FOUND" ui_print "-- Do you want to download or update clash?" ui_print "— [ Vol UP(+): Yes ]" ui_print "— [ Vol DOWN(-): No ]" handle_download "clash" else ui_print "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" - ui_print "📦 mihomo → ❌ NOT FOUND " + ui_print "— mihomo → ❌ NOT FOUND " ui_print "— Do you want to download or update mihomo?" ui_print "— [ Vol UP(+): Yes ]" ui_print "— [ Vol DOWN(-): No ]"