Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. iWait="1s";
  4. proxyListFile=/home/livestreamer/proxy_list;
  5. sChannelName=$1;
  6.  
  7. if [ $(screen -ls watcher_$sChannelName | wc -l) -eq 2 ]
  8. then
  9. screen -dmS watcher_$sChannelName watch -t 'screen -ls livestream_ | wc -l'
  10. fi
  11.  
  12. while [ $(screen -ls watcher_$sChannelName | wc -l) -gt 2 ]
  13. do
  14. proxy=$(sort -R $proxyListFile | head -1)
  15. echo "[$sChannelName] Start Broadcast with $proxy"
  16. screen -dmS livestream_$sChannelName_$proxy livestreamer twitch.tv/$sChannelName worst -o /dev/null --http-proxy $proxy;
  17. sleep $iWait
  18. done;
  19.  
  20. screen -ls | grep $sChannelName | cut -d. -f1 | awk '{print $1}' | xargs kill
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement