Update mm-scripts.sh
This commit is contained in:
@@ -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(){
|
UPDATESERVICE(){
|
||||||
if [ "${1}" != "" ]; then
|
if [ "${1}" != "" ]; then
|
||||||
usrvc=${1}
|
usrvc=${1}
|
||||||
@@ -860,7 +899,8 @@ MMSETUP(){
|
|||||||
echo -e "${idsCL[LightCyan]}Stopping system services ... ${idsCL[Default]}"
|
echo -e "${idsCL[LightCyan]}Stopping system services ... ${idsCL[Default]}"
|
||||||
MMSTOP
|
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
|
case "$choice" in
|
||||||
[Yy])
|
[Yy])
|
||||||
echo
|
echo
|
||||||
@@ -933,7 +973,7 @@ MMSETUP(){
|
|||||||
;;
|
;;
|
||||||
esac
|
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
|
case "$choice" in
|
||||||
[Yy])
|
[Yy])
|
||||||
echo
|
echo
|
||||||
@@ -948,7 +988,8 @@ MMSETUP(){
|
|||||||
if [ "${SERVICESCHECK}" != "" ]; then
|
if [ "${SERVICESCHECK}" != "" ]; then
|
||||||
echo
|
echo
|
||||||
srvcs2=${SERVICESCHECK/snap.tautulli.tautulli/tautulli}
|
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
|
case "$choice" in
|
||||||
[Nn]) SERVICESCHECK="";;
|
[Nn]) SERVICESCHECK="";;
|
||||||
* ) srvcs=${srvcs2};;esac
|
* ) 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]}"
|
echo -e "${idsCL[LightCyan]}You may choose to setup notifications by either SMTP and/or Pushover:${idsCL[Default]}"
|
||||||
|
|
||||||
if [ "${EMAIL_NOTICE}" != "" ]; then
|
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
|
case "$choice" in
|
||||||
[Nn]) EMAIL_NOTICE="";;esac
|
[Nn]) EMAIL_NOTICE="";;esac
|
||||||
fi
|
fi
|
||||||
@@ -1017,7 +1058,7 @@ MMSETUP(){
|
|||||||
source /opt/idssys/mediamanager/settings.conf
|
source /opt/idssys/mediamanager/settings.conf
|
||||||
IFS=,; SERVICES_CHECK=(${SERVICESCHECK}); unset IFS
|
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
|
case "$choice" in
|
||||||
[Nn]) tmp='';;
|
[Nn]) tmp='';;
|
||||||
* ) for usrvc in "${UPDATE_SERVICES[@]}"; do
|
* ) for usrvc in "${UPDATE_SERVICES[@]}"; do
|
||||||
@@ -1041,7 +1082,7 @@ MMSETUP(){
|
|||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
echo
|
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
|
echo
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
[Yy]) MMSTART start;;
|
[Yy]) MMSTART start;;
|
||||||
|
|||||||
Reference in New Issue
Block a user