From 15608499e83984899d1ef252de3dd77935e6b812 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 22 Apr 2023 16:42:35 -0500 Subject: [PATCH] Update mm-scripts.sh --- mm-scripts.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/mm-scripts.sh b/mm-scripts.sh index 7727edb..1106eab 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -931,9 +931,6 @@ MMSETUP(){ ;; esac - - - read -n 1 -p "This will reset the config, do you wish to continue (y/N)?" choice case "$choice" in [Yy]) @@ -985,6 +982,7 @@ MMSETUP(){ read -e EMAIL_NOTICE fi [ "${EMAIL_NOTICE}" != "" ] && echo "EMAIL_NOTICE=${EMAIL_NOTICE}" >> ${MMFOLDER}/settings.conf || echo "# EMAIL_NOTICE=email@address.com" >> ${MMFOLDER}/settings.conf + echo if [ "${PUSHOVER_APP_TOKEN}" != "" ]; then read -n 1 -p "Use previous Pushover App Token [${PUSHOVER_APP_TOKEN}] (Y/n)?" choice @@ -996,6 +994,7 @@ MMSETUP(){ read -e PUSHOVER_APP_TOKEN fi [ "${PUSHOVER_APP_TOKEN}" != "" ] && echo "PUSHOVER_APP_TOKEN=${PUSHOVER_APP_TOKEN}" >> ${MMFOLDER}/settings.conf || echo "# PUSHOVER_APP_TOKEN=\"\"" >> ${MMFOLDER}/settings.conf + echo if [ "${PUSHOVER_APP_TOKEN}" != "" ]; then if [ "${PUSHOVER_USER_TOKEN}" != "" ]; then @@ -1013,6 +1012,17 @@ MMSETUP(){ echo "# PUSHOVER_USER_TOKEN=\"\"" >> ${MMFOLDER}/settings.conf fi + 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 + case "$choice" in + [Nn]) tmp='';; + * ) for usrvc in "${UPDATE_SERVICES[@]}"; do + [ "${MM_UPDATE_REPO[${usrvc}]}" != "" ] && UPDATESERVICE ${usrvc} + done;; + esac + CNFG=true ;; @@ -1032,7 +1042,7 @@ MMSETUP(){ read -n 1 -p "Do you wish to start services now (y/N)?" choice echo case "$choice" in - [Yy]) source /opt/idssys/mediamanager/settings.conf;IFS=,;SERVICES_CHECK=(${SERVICESCHECK});unset IFS;MMSTART start;; + [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