Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # script alternatif buat xl vidio yang gampang dc (butuh ip baru), ini hanya untuk user BFR/CFM
- timeout_count=0
- while true
- do
- response=$(curl -s -o /dev/null -w "%{http_code}" -m 5 https://www.google.com)
- if [ $? -eq 0 ]; then
- timeout_count=0
- echo -e "\e[32mKoneksi Aktif : [$response]\e[0m"
- else
- ((timeout_count++))
- echo -e "\e[33mKoneksi Timeout : [$response]\e[0m"
- fi
- if [ $timeout_count -eq 3 ]; then
- su -c 'settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true'
- sleep 7
- su -c 'settings put global airplane_mode_on 0; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false'
- sleep 5
- timeout_count=0
- fi
- sleep 3
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement