Skip to content

Commit

Permalink
added run-ffmpeg script
Browse files Browse the repository at this point in the history
  • Loading branch information
acjohnson committed Apr 30, 2021
1 parent a12d49f commit a5a0de1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions examples/run-ffmpeg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

date

# remove broken files...
/usr/bin/find /library/TV\ Shows/ -name "*RECODE*" -size 44c -exec rm -f {} \;

# only run if ffmpeg isn't running
for pid in $(pidof ffmpeg); do
if [ $pid != $$ ]; then
echo "[$(date)] : Process is already running with PID $pid"
exit 1
fi
done

#source /root/ansible/venv/bin/activate

ansible-playbook -i 127.0.0.1, /root/ansible/playbook_ffmpeg.yml -e "ansible_python_interpreter=/usr/bin/python3"
ansible-playbook -i 127.0.0.1, /root/ansible/playbook_ffmpeg.yml -e "find_base=/library/Movies/ min_file_size=2300m ansible_python_interpreter=/usr/bin/python3"

date
#deactivate

0 comments on commit a5a0de1

Please sign in to comment.