update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='3.9.80-09302024'
|
||||
VERS='3.9.85-09302024'
|
||||
|
||||
MMFOLDER="/opt/idssys/mediamanager"
|
||||
TMPFOLDER="${MMFOLDER}/.tmp"
|
||||
|
||||
@@ -192,7 +192,7 @@ MMSTART(){
|
||||
echo "$(date) - Your '${sessiontimeout}' session limit reached, restarting vpn & services" >> ${MM_LOGFILE}
|
||||
echo -en "${idsCL[LightCyan]}Your '${idsCL[White]}${sessiontimeout}${idsCL[LightCyan]}' session limit reached, restarting vpn & services${idsCL[Default]}"
|
||||
fi
|
||||
[ -f ${TMPFOLDER}/mm.noservices ] && rv="vpn" || rv=""
|
||||
([ -f ${TMPFOLDER}/mm.noservices ] || [ -f ${MMFOLDER}/mm.noservices ]) && rv="vpn" || rv=""
|
||||
MMSTOP >/dev/null 2>&1
|
||||
echo -en "."
|
||||
read -et 10
|
||||
@@ -669,6 +669,7 @@ MMSTATUS(){
|
||||
if ([ ! -f ${TMPFOLDER}/mm.stop* ] && [ "${1}" == "fix" ]) || ([ ! -f ${TMPFOLDER}/mm.stop ] && [ -f ${TMPFOLDER}/mm.stop.checking ] && [ "${1}" == "fix" ]); then
|
||||
echo
|
||||
echo -e "${idsCL[LightCyan]}Restarting system...${idsCL[Default]}"
|
||||
([ -f ${TMPFOLDER}/mm.noservices ] || [ -f ${MMFOLDER}/mm.noservices ]) && rv="vpn" || rv=""
|
||||
MMSTOP
|
||||
echo -en "${idsCL[LightCyan]}Pausing for 10secs... ${idsCL[Default]}"
|
||||
sleep 10s
|
||||
@@ -676,7 +677,7 @@ MMSTATUS(){
|
||||
echo
|
||||
echo -e "${idsCL[LightCyan]}Starting system back up...${idsCL[Default]}"
|
||||
echo
|
||||
MMSTART
|
||||
MMSTART start ${rv}
|
||||
|
||||
msg=" ${MM_SERVICES[wireguard]}"
|
||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||
@@ -733,6 +734,7 @@ MMSTATUS(){
|
||||
if ([ ! -f ${TMPFOLDER}/mm.stop* ] && [ "${1}" == "fix" ]) || ([ ! -f ${TMPFOLDER}/mm.stop ] && [ -f ${TMPFOLDER}/mm.stop.checking ] && [ "${1}" == "fix" ]); then
|
||||
echo
|
||||
echo -e "${idsCL[LightCyan]}Restarting system...${idsCL[Default]}"
|
||||
([ -f ${TMPFOLDER}/mm.noservices ] || [ -f ${MMFOLDER}/mm.noservices ]) && rv="vpn" || rv=""
|
||||
MMSTOP
|
||||
echo -en "${idsCL[LightCyan]}Pausing for 10secs... ${idsCL[Default]}"
|
||||
sleep 10s
|
||||
@@ -740,7 +742,7 @@ MMSTATUS(){
|
||||
echo
|
||||
echo -e "${idsCL[LightCyan]}Starting system back up...${idsCL[Default]}"
|
||||
echo
|
||||
MMSTART start
|
||||
MMSTART start ${rv}
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -845,15 +847,15 @@ VPNSPEEDTEST(){
|
||||
echo -e "${idsCL[Green]}VPN Speedtest Comparison${idsCL[Default]}"
|
||||
DIVIDER . lightGreen
|
||||
echo
|
||||
if [ ! -f ${TMPFOLDER}/mm.stop ] && [ "${SERVICESCHECK}" != "" ]; then
|
||||
echo -en "${idsCL[LightCyan]}This requires all media management services to be stopped, ok (Y/n)? ${idsCL[Default]}"
|
||||
if [ ! -f ${TMPFOLDER}/mm.stop ]; then
|
||||
echo -en "${idsCL[LightCyan]}This requires all MM/VPN services to be stopped, ok (Y/n)? ${idsCL[Default]}"
|
||||
read -n 1 choice
|
||||
case "$choice" in
|
||||
[Nn]) exit 0;; esac
|
||||
echo
|
||||
echo -en "${idsCL[LightCyan]}Stopping media management services ... ${idsCL[Default]}"
|
||||
echo -en "${idsCL[LightCyan]}Stopping MM/VPN Services ... ${idsCL[Default]}"
|
||||
else
|
||||
echo -en "${idsCL[LightCyan]}Verifying media management services are stopped ... ${idsCL[Default]}"
|
||||
echo -en "${idsCL[LightCyan]}Verifying MM/VPN Services are stopped ... ${idsCL[Default]}"
|
||||
fi
|
||||
MMSTOP >/dev/null 2>&1
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
@@ -882,19 +884,18 @@ VPNSPEEDTEST(){
|
||||
|
||||
echo -en "${idsCL[LightCyan]}Stopping vpn ... ${idsCL[Default]}"
|
||||
# "${VPN_STOP[@]}" >/dev/null 2>&1
|
||||
([ -f ${TMPFOLDER}/mm.noservices ] || [ -f ${MMFOLDER}/mm.noservices ]) && rv="vpn" || rv=""
|
||||
MMSTOP >/dev/null 2>&1
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
if [ "${SERVICESCHECK}" != "" ]; then
|
||||
echo
|
||||
echo -en "${idsCL[LightCyan]}Would you like to start media management services (y/N)? ${idsCL[Default]}"
|
||||
read -n 1 choice
|
||||
echo
|
||||
case "$choice" in
|
||||
[Yy]) MMSTART start;;
|
||||
* ) echo -e "${idsCL[Cyan]}Not starting. To start, run the command '${idsCL[Green]}mm start${idsCL[LightCyan]}'${idsCL[Default]}";echo;echo;;
|
||||
esac
|
||||
fi
|
||||
echo
|
||||
echo -en "${idsCL[LightCyan]}Would you like to start MM/VPN services (y/N)? ${idsCL[Default]}"
|
||||
read -n 1 choice
|
||||
echo
|
||||
case "$choice" in
|
||||
[Yy]) MMSTART start ${rv};;
|
||||
* ) echo -e "${idsCL[Cyan]}Not starting. To start, run the command '${idsCL[Green]}mm start${idsCL[LightCyan]}'${idsCL[Default]}";echo;echo;;
|
||||
esac
|
||||
}
|
||||
|
||||
UPDATESERVICE(){
|
||||
@@ -1424,7 +1425,7 @@ MMSETUP(){
|
||||
# echo
|
||||
# srvcs2=${SERVICESCHECK/snap.tautulli.tautulli/tautulli}
|
||||
# srvcs2=${srvcs2/snap.overseerr.daemon/overseerr}
|
||||
# echo -e "${idsCL[LightCyan]}Run previous media management services${idsCL[Default]}"
|
||||
# echo -e "${idsCL[LightCyan]}Run previous MM/VPN Services${idsCL[Default]}"
|
||||
# echo -en "${idsCL[LightYellow]}['${idsCL[White]}${srvcs2}${idsCL[LightYellow]}']${idsCL[LightCyan]} (Y/n)? ${idsCL[Default]}"
|
||||
# read -n 1 choice
|
||||
# case "$choice" in
|
||||
@@ -1635,7 +1636,7 @@ MMSETUP(){
|
||||
esac
|
||||
else
|
||||
echo
|
||||
echo -en "${idsCL[LightCyan]}Would you like to update media management services (y/N)? ${idsCL[Default]}"
|
||||
echo -en "${idsCL[LightCyan]}Would you like to update MM/VPN Services (y/N)? ${idsCL[Default]}"
|
||||
read -n 1 choice
|
||||
case "$choice" in
|
||||
[Yy]) for usrvc in "${UPDATE_SERVICES[@]}"; do
|
||||
@@ -1644,7 +1645,7 @@ MMSETUP(){
|
||||
* ) tmp='';;
|
||||
esac
|
||||
echo
|
||||
echo -en "${idsCL[LightCyan]}Would you like to start media management services (y/N)? ${idsCL[Default]}"
|
||||
echo -en "${idsCL[LightCyan]}Would you like to start MM/VPN Services (y/N)? ${idsCL[Default]}"
|
||||
read -n 1 choice
|
||||
echo
|
||||
case "$choice" in
|
||||
|
||||
Reference in New Issue
Block a user