Update mm-scripts.sh
This commit is contained in:
@@ -161,44 +161,50 @@ MMSTATUS(){
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ ! -f /opt/mm.update.stop ]; then
|
||||||
case $action in
|
case $action in
|
||||||
start | check)
|
start | check)
|
||||||
if [ -f /opt/mm.stop ] && [ "${action}" = "check" ]; then
|
if [ -f /opt/mm.stop ] && [ "${action}" = "check" ]; then
|
||||||
echo -e "${idsCL[Yellow]}The system is currently stopped ${idsCL[LightCyan]}(You must run \"mm start\" to start services again)${idsCL[Default]}"
|
echo -e "${idsCL[Yellow]}The system is currently stopped ${idsCL[LightCyan]}(You must run \"mm start\" to start services again)${idsCL[Default]}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
touch /opt/mm.stop
|
touch /opt/mm.stop
|
||||||
MMSTART;;
|
MMSTART;;
|
||||||
|
|
||||||
stop)
|
stop)
|
||||||
MMSTOP;;
|
MMSTOP;;
|
||||||
|
|
||||||
restart)
|
restart)
|
||||||
MMSTOP
|
MMSTOP
|
||||||
MMSTART;;
|
MMSTART;;
|
||||||
|
|
||||||
status)
|
status)
|
||||||
if [ -f /opt/mm.stop ]; then
|
if [ -f /opt/mm.stop ]; then
|
||||||
echo -e "${idsCL[Yellow]}The system is currently stopped ${idsCL[LightCyan]}(You must run \"mm start\" to start services again)${idsCL[Default]}"
|
echo -e "${idsCL[Yellow]}The system is currently stopped ${idsCL[LightCyan]}(You must run \"mm start\" to start services again)${idsCL[Default]}"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
MMSTATUS;;
|
MMSTATUS;;
|
||||||
|
|
||||||
update);;
|
update);;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo -e "Usage: ${idsCL[LightCyan]}mm${idsCL[Default]} {"
|
||||||
|
echo -e " ${idsCL[Yellow]}start${idsCL[Default]} --> Start services"
|
||||||
|
echo -e " ${idsCL[Yellow]}stop${idsCL[Default]} --> Stop services"
|
||||||
|
echo -e " ${idsCL[Yellow]}restart${idsCL[Default]} --> Restart services"
|
||||||
|
echo -e " ${idsCL[Yellow]}check${idsCL[Default]} --> Check for VPN and start services if needed"
|
||||||
|
echo -e " ${idsCL[Yellow]}status${idsCL[Default]} --> Check service status"
|
||||||
|
echo -e "}"
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
exit 0;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
else
|
||||||
|
echo -e "${idsCL[Yellow]}Part of the system is currently updating, please try again shortly. Updates usually only take 1-3mins.${idsCL[Default]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
*)
|
|
||||||
echo -e "Usage: ${idsCL[LightCyan]}mm${idsCL[Default]} {"
|
|
||||||
echo -e " ${idsCL[Yellow]}start${idsCL[Default]} --> Start services"
|
|
||||||
echo -e " ${idsCL[Yellow]}stop${idsCL[Default]} --> Stop services"
|
|
||||||
echo -e " ${idsCL[Yellow]}restart${idsCL[Default]} --> Restart services"
|
|
||||||
echo -e " ${idsCL[Yellow]}check${idsCL[Default]} --> Check for VPN and start services if needed"
|
|
||||||
echo -e " ${idsCL[Yellow]}status${idsCL[Default]} --> Check service status"
|
|
||||||
echo -e "}"
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
exit 0;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
Reference in New Issue
Block a user