Update mm-scripts.sh
This commit is contained in:
@@ -352,12 +352,11 @@ MMSTART(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
[ "${1}" == "start" ] && [ "${2}" != "vpn" ] && rm -f ${MMFOLDER}/mm.noservices
|
[ "${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
|
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
|
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||||
[ "$(systemctl is-active ${srvc})" != "active" ] && /bin/systemctl restart ${srvc}
|
[ "$(systemctl is-active ${srvc})" != "active" ] && /bin/systemctl restart ${srvc}
|
||||||
done
|
done
|
||||||
@@ -417,9 +416,11 @@ MMSTART(){
|
|||||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||||
|
|
||||||
elif [ -f ${MMFOLDER}/mm.noservices ]; then
|
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
|
else
|
||||||
echo -e "${idsCL[LightYellow]}Skipping ${mmsv} Services ${idsCL[Default]}"
|
echo -e "${idsCL[LightYellow]}Skipping${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user