Monday, November 09, 2009

After scripts to move files and provide notification as it goes

This is the script that runs after each nzb download has occured.

#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/prowl
for 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/nul

prowl.sh 2 "File Moved" "File: $f has been moved off the server to SusansPC";
}
done

#Unmount share as we dont need it taking up resources

umount /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.

Prowl for Linx

WOOHOOO... Finally a way to get Growl messages out of my linux box and onto the iphone.
After playing with Mumbles I'm now able to get notifications on the MAC once files have been downloaded, par2'ed unpacked and moved to the main storage server.

Now I can get those same notifications on the iPhone.

Remember the link - Donate if you can... its well worth it.