nevusdotcom

Notificaciones de torrents completados por email/prowl

Oct 13th, 2011
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.83 KB | None | 0 0
  1. #!/bin/sh  
  2. # Enviar notificaciones de torrents completados.  
  3. # Author: NeVuSdOtCoM
  4. # Version: 0.1  
  5. # URL: @mybbstuff on twitter
  6. # License: GPL  
  7. # Pastebin: http://pastebin.com/bxs9z8ma
  8. #sleep 120
  9. #Creo el mensaje:
  10. mensaje=`transmission-remote --list | awk '$2== "100%" { print substr($NF,0,30) }'`
  11. #echo $mensaje
  12. if [ -z $mensaje ]; then
  13.     echo "Nothing to do... GoodBye :) "
  14. else
  15.     #Envio por Email:
  16.     echo $mensaje | mail -s 'Descarga completada' myemail@servidor.com
  17.     #Envio via Prowl al iPhone
  18.     curl -k https://prowl.weks.net/publicapi/add -F apikey=XXXXXXXXX -F application="NeVuSdOtCoM's Transmission/Prowl Notification Script" -F description="`echo $mensaje`"
  19.     #Elimino los completados `en teoria!`
  20.     transmission-remote --list  | grep 100% | grep Done | awk '{print $1}' | xargs -n 1 -i% transmission-remote -t % -r
  21. fi
Advertisement
Add Comment
Please, Sign In to add comment