Skip to content

Instantly share code, notes, and snippets.

@hualro
Created March 8, 2015 23:21
Show Gist options
  • Save hualro/d2812175558e585bb5b3 to your computer and use it in GitHub Desktop.
Save hualro/d2812175558e585bb5b3 to your computer and use it in GitHub Desktop.
aftermovie.sh
#!/bin/bash
# Author: Hugo Alvarado
# Date: March 8, 2015
#This parameter is the full path to the movie created by Motion.
MOVIE=$1
echo "Uploading Movie: $MOVIE" >> /path/to/your/movie.log
/usr/bin/wput -B ftp://username:password@ftp.yourdomain $MOVIE 2> /path/to/your/error.log
if [ "$?" = "0" ]; then
echo "Movie Uploaded Successfully." >> /path/to/your/movie.log
else
echo "Couldnt Upload Movie." >> /path/to/your/movie.log
exit 1
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment