Re add music to scripts

pull/46/head
Dan Puttick 2017-01-13 17:56:16 -05:00
parent a8a670c08e
commit b1353fa5bf
3 changed files with 11 additions and 3 deletions

View File

@ -47,7 +47,7 @@ do
${PUMOUNT} ${SRC}
${PMOUNT} -r ${partition} ${SRC}
if [ ${?} -ne 0 ]; then
# Previous command (mounting this partition) failed
# Previous command (mounting current partition) failed
echo "GROOMER: Unable to mount ${partition} on /media/${SRC}"
else
echo "GROOMER: ${partition} mounted at /media/${SRC}"
@ -61,9 +61,9 @@ do
LOGFILE="${LOGS}/processing.txt"
# Run the current partition through filecheck.py
echo "GROOMER: ==== Starting processing of /media/${SRC} to ${target_dir}. ====" >> ${LOGFILE}
echo "==== Starting processing of /media/${SRC} to ${target_dir}. ====" >> ${LOGFILE}
filecheck.py --source /media/${SRC} --destination ${target_dir} || true
echo "GROOMER: ==== Done with /media/${SRC} to ${target_dir}. ====" >> ${LOGFILE}
echo "==== Done with /media/${SRC} to ${target_dir}. ====" >> ${LOGFILE}
# List destination files (recursively) for debugging
ls -lR "${target_dir}"

View File

@ -15,10 +15,17 @@ fi
clean(){
echo "GROOMER: cleaning up after init.sh."
${SYNC}
# Stop the music from playing
kill -9 $(cat /tmp/music.pid)
rm -f /tmp/music.pid
}
trap clean EXIT TERM INT
# Start music
./music.sh &
echo $! > /tmp/music.pid
# List block storage devices (for debugging)
lsblk |& tee ${GROOM_LOG}

View File

@ -6,4 +6,5 @@ cp /media/sf_ubuntu-shared/Circlean-Ubuntu/fs_filecheck/opt/groomer/init.sh /mnt
cp /media/sf_ubuntu-shared/Circlean-Ubuntu/fs_filecheck/opt/groomer/groomer.sh /mnt/rpi/opt/groomer/groomer.sh
cp /media/sf_ubuntu-shared/Circlean-Ubuntu/fs_filecheck/opt/groomer/config.sh /mnt/rpi/opt/groomer/config.sh
cp /media/sf_ubuntu-shared/Circlean-Ubuntu/fs_filecheck/opt/groomer/mount_dest.sh /mnt/rpi/opt/groomer/mount_dest.sh
cp /media/sf_ubuntu-shared/Circlean-Ubuntu/fs_filecheck/opt/groomer/music.sh /mnt/rpi/opt/groomer/music.sh
cp /media/sf_ubuntu-shared/Circlean-Ubuntu/fs_filecheck/etc/rc.local /mnt/rpi/etc/rc.local