Update run.sh

This commit is contained in:
2022-06-16 19:25:53 -05:00
parent b798f1166e
commit c0ab0e4557

11
run.sh
View File

@@ -1,10 +1,19 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# MediaManager Loader # 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 if [ ! -f /opt/mm.checking ]; then
touch /opt/mm.checking touch /opt/mm.checking
source /opt/idssys/defaults/colors.inc
source /opt/idssys/defaults/default.inc source /opt/idssys/defaults/default.inc
source /opt/idssys/settings/mediamanager.conf source /opt/idssys/settings/mediamanager.conf