Update mm-scripts.sh

This commit is contained in:
2023-04-22 17:25:24 -05:00
parent 705c73ce7b
commit a1da52e862

View File

@@ -694,6 +694,45 @@ GETVPNINFO(){
}
VPNSPEEDTEST(){
echo -e "${idsCL[Green]}VPN Speedtest Comparison${idsCL[Default]}"
echo
read -n 1 -p "This requires all media management services to be stopped, ok (Y/n)?" choice
case "$choice" in
[Nn]) exit 0;;
esac
echo
echo -en "${idsCL[LightCyan]}Stopping media management services ... ${idsCL[Default]}"
MMSTOP >/dev/null 2>&1
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
echo
echo -e "${idsCL[Green]}Running test without VPN${idsCL[Default]}"
DIVIDER . green
speedtest
echo
echo -en "${idsCL[LightCyan]}Starting vpn ... ${idsCL[Default]}"
MMSTART vpn >/dev/null 2>&1
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
echo
echo -e "${idsCL[Green]}Running test with VPN${idsCL[Default]}"
DIVIDER . green
speedtest
echo
MMSTOP >/dev/null 2>&1
echo
read -n 1 -p "Would you like to start media management services (y/N)?" 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
}
UPDATESERVICE(){
if [ "${1}" != "" ]; then
usrvc=${1}
@@ -860,7 +899,8 @@ MMSETUP(){
echo -e "${idsCL[LightCyan]}Stopping system services ... ${idsCL[Default]}"
MMSTOP
read -n 1 -p "Would you like to configure the hostname and network settings (y/N)?" choice
echo -e "${idsCL[LightCyan]}Would you like to configure the hostname and network settings (y/N)? ${idsCL[Default]}"
read -n 1 choice
case "$choice" in
[Yy])
echo
@@ -933,7 +973,7 @@ MMSETUP(){
;;
esac
read -n 1 -p "This will reset the config, do you wish to continue (y/N)?" choice
read -n 1 -p "This will reset the MM app config, do you wish to continue (y/N)?" choice
case "$choice" in
[Yy])
echo
@@ -948,7 +988,8 @@ MMSETUP(){
if [ "${SERVICESCHECK}" != "" ]; then
echo
srvcs2=${SERVICESCHECK/snap.tautulli.tautulli/tautulli}
read -n 1 -p "Run previous services [${srvcs2}] (Y/n)?" choice
echo -e "${idsCL[LightCyan]}Run previous media management services${idsCL[Default]}"
read -n 1 -p "[${srvcs2}] (Y/n)? " choice
case "$choice" in
[Nn]) SERVICESCHECK="";;
* ) srvcs=${srvcs2};;esac
@@ -975,7 +1016,7 @@ MMSETUP(){
echo -e "${idsCL[LightCyan]}You may choose to setup notifications by either SMTP and/or Pushover:${idsCL[Default]}"
if [ "${EMAIL_NOTICE}" != "" ]; then
read -n 1 -p "Use previous email address [${EMAIL_NOTICE}] (Y/n)?" choice
read -n 1 -p "Use previous email address [${EMAIL_NOTICE}] (Y/n)? " choice
case "$choice" in
[Nn]) EMAIL_NOTICE="";;esac
fi
@@ -1017,7 +1058,7 @@ MMSETUP(){
source /opt/idssys/mediamanager/settings.conf
IFS=,; SERVICES_CHECK=(${SERVICESCHECK}); unset IFS
read -n 1 -p "Would you like to update services [${srvcs2}] (Y/n)?" choice
read -n 1 -p "Would you like to update media management services [${srvcs2}] (Y/n)?" choice
case "$choice" in
[Nn]) tmp='';;
* ) for usrvc in "${UPDATE_SERVICES[@]}"; do
@@ -1041,7 +1082,7 @@ MMSETUP(){
esac
else
echo
read -n 1 -p "Do you wish to start services now (y/N)?" choice
read -n 1 -p "Would you like to start media management services (y/N)?" choice
echo
case "$choice" in
[Yy]) MMSTART start;;