#Mount SMB Share to send files to:mount.cifs //192.168.0.100/downloads /mnt/susdown -o user=xbmc,pass=xbmc# Do the actual copying and notifications via growl/prowlfor f in /root/downloads/complete/*;do{cp -v -R "$f" /mnt/susdown/mumbles-send -g 192.168.0.148 "Copy Success" "Copied file: $f">/dev/null;rm -r -f "$f"mumbles-send -g 192.168.0.148 "Deletion Confirmed" "Remove $f from Server">/dev/nulprowl.sh 2 "File Moved" "File: $f has been moved off the server to SusansPC";}done#Unmount share as we dont need it taking up resourcesumount /mnt/susdown
Just need to work out how to make the script act based on result codes. Then i could really check if this are being moved... although seems like alot of fucking around to achieve something so simple. This small script lets me play with most things I find interesting about integrating my phone with EVERYTHING i do in some way shape or form.
No comments:
Post a Comment