Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- username="$1"
- lastonline=false
- while true
- do
- output=$(curl "https://chaturbate.com/$username/" | grep -F 'room_status\u0022: \u0022offline\u0022')
- if [ -z "$output" ]
- then
- if [ "$lastonline" = true ]
- then
- echo "Still online!"
- else
- echo "Online!"
- i3-nagbar -t warning -m "$1 is now online!"
- lastonline=true
- fi
- else
- if [ "$lastonline" = true ]
- then
- lastonline=false
- echo "Now offline..."
- else
- echo "Still offline..."
- fi
- fi
- sleep 5m
- done
Add Comment
Please, Sign In to add comment