Update mm-scripts.sh
This commit is contained in:
@@ -34,14 +34,23 @@ MMSTART(){
|
|||||||
[ $VERBOSE = true ] && chktmstart=`date +%s`
|
[ $VERBOSE = true ] && chktmstart=`date +%s`
|
||||||
if [ "${1}" = "start" ] || [ "${1}" = "" ]; then
|
if [ "${1}" = "start" ] || [ "${1}" = "" ]; then
|
||||||
GOFORSTART=true;
|
GOFORSTART=true;
|
||||||
|
|
||||||
elif [ "${1}" = "check" ] && [ "$(ip link | grep "wg-torguard")" = "" ] && [ ! -f /opt/idssys/mediamanager/mm.vpn* ]; then
|
elif [ "${1}" = "check" ] && [ "$(ip link | grep "wg-torguard")" = "" ] && [ ! -f /opt/idssys/mediamanager/mm.vpn* ]; then
|
||||||
GOFORSTART=true;
|
GOFORSTART=true;
|
||||||
[ "${EMAIL_NOTICE}" != "" ] && echo "" | mail -s "Starting Media Management Systems" ${EMAIL_NOTICE}
|
[ "${EMAIL_NOTICE}" != "" ] && echo "" | mail -s "Starting Media Management Systems" ${EMAIL_NOTICE}
|
||||||
echo "$(date) - Starting Media Management system - (wireguard not running)" >> $logfile
|
echo "$(date) - Starting Media Management system - (wireguard not running)" >> $logfile
|
||||||
echo -e "${idsCL[LightCyan]}Fresh startup${idsCL[Default]}"
|
echo -e "${idsCL[LightCyan]}Fresh startup${idsCL[Default]}"
|
||||||
|
|
||||||
|
elif [ "${1}" = "check" ] && [ "$(ip link | grep "wg-torguard")" = "" ] && [ -f /opt/idssys/mediamanager/mm.vpn* ]; then
|
||||||
|
GOFORSTART=true;
|
||||||
|
[ "${EMAIL_NOTICE}" != "" ] && echo "" | mail -s "Starting Media Management Systems" ${EMAIL_NOTICE}
|
||||||
|
echo "$(date) - Attempting to restart systems after VPN failure..." >> $logfile
|
||||||
|
echo -e "${idsCL[LightCyan]}Attempting to restart systems after VPN failure...${idsCL[Default]}"
|
||||||
else
|
else
|
||||||
GOFORSTART=false;
|
GOFORSTART=false;
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${GOFORSTART} = true ]; then
|
if [ ${GOFORSTART} = true ]; then
|
||||||
mmsv='Starting'
|
mmsv='Starting'
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user