From b1353fa5bf2bffaabc80711abe677c55e084b62e Mon Sep 17 00:00:00 2001 From: Dan Puttick Date: Fri, 13 Jan 2017 17:56:16 -0500 Subject: [PATCH] Re add music to scripts --- fs_filecheck/opt/groomer/groomer.sh | 6 +++--- fs_filecheck/opt/groomer/init.sh | 7 +++++++ shell_utils/copy_groomer_to_image.sh | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/fs_filecheck/opt/groomer/groomer.sh b/fs_filecheck/opt/groomer/groomer.sh index 7b8dc02..63d11e8 100755 --- a/fs_filecheck/opt/groomer/groomer.sh +++ b/fs_filecheck/opt/groomer/groomer.sh @@ -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}" diff --git a/fs_filecheck/opt/groomer/init.sh b/fs_filecheck/opt/groomer/init.sh index 120c085..f990a4c 100755 --- a/fs_filecheck/opt/groomer/init.sh +++ b/fs_filecheck/opt/groomer/init.sh @@ -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} diff --git a/shell_utils/copy_groomer_to_image.sh b/shell_utils/copy_groomer_to_image.sh index 8337982..b870687 100755 --- a/shell_utils/copy_groomer_to_image.sh +++ b/shell_utils/copy_groomer_to_image.sh @@ -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