diff --git a/run.sh b/run.sh index 1c74dd0..ec3c9be 100755 --- a/run.sh +++ b/run.sh @@ -1,10 +1,19 @@ #!/usr/bin/env bash # MediaManager Loader +source /opt/idssys/defaults/colors.inc + +if [ -f /opt/mm.checking ]; then + fd=$(( `date +%s` - `stat -L --format %Y /opt/mm.checking` )) + if [ ${fd} -gt 900 ]; then + rm -f /opt/mm.checking + else + echo -en "${idsCL[LightCyan]}Try again later, 'mm' program currently in use...${idsCL[Default]}" + fi +fi if [ ! -f /opt/mm.checking ]; then touch /opt/mm.checking - source /opt/idssys/defaults/colors.inc source /opt/idssys/defaults/default.inc source /opt/idssys/settings/mediamanager.conf @@ -58,7 +67,7 @@ if [ ! -f /opt/mm.checking ]; then fi fi /opt/idssys/mediamanager/mm-scripts.sh ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} - #rm -f /opt/mm.checking + #rm -f /opt/mm.checking fi exit 0