diff --git a/mm-scripts.sh b/mm-scripts.sh index 3104285..435be3a 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -352,12 +352,11 @@ MMSTART(){ fi [ "${1}" == "start" ] && [ "${2}" != "vpn" ] && rm -f ${MMFOLDER}/mm.noservices + + msg="${mmsv} Services"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}" + if [ "${2}" != "vpn" ] && [ ! -f ${MMFOLDER}/mm.noservices ] && [ ! -f ${MMFOLDER}/mm.plexmount.fail ]; then - - msg="${mmsv} Services" - c=0; spc=''; spc1=$((${cw_spc}-${#msg})) - until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}" for srvc in "${SERVICES_CHECK[@]}"; do [ "$(systemctl is-active ${srvc})" != "active" ] && /bin/systemctl restart ${srvc} done @@ -417,9 +416,11 @@ MMSTART(){ echo -e "${idsCL[Green]}Done${idsCL[Default]}" elif [ -f ${MMFOLDER}/mm.noservices ]; then - echo -e "${idsCL[LightCyan]}Skipping ${mmsv} Services, started wtih VPN only${idsCL[Default]}" + echo -e "${idsCL[LightCyan]}Skipping, started wtih VPN only${idsCL[Default]}" + elif [ -f ${MMFOLDER}/mm.plexmount.fail ]; then + echo -e "${idsCL[LightCyan]}Skipping, plex media is not mounted${idsCL[Default]}" else - echo -e "${idsCL[LightYellow]}Skipping ${mmsv} Services ${idsCL[Default]}" + echo -e "${idsCL[LightYellow]}Skipping${idsCL[Default]}" fi echo