Update mm-scripts.sh

This commit is contained in:
2023-07-10 22:52:23 -05:00
parent db5ad25d8d
commit 9ae2505de0

View File

@@ -1083,8 +1083,7 @@ WantedBy=multi-user.target
SERVICEBACKUP(){ SERVICEBACKUP(){
usrvc=${1} usrvc=${1}
echo "HERE1: ${usrvc}" if [ "${usrvc}" == "" ] || [ "${usrvc}" == "true" ]; then
if [ "${usrvc}" == "" ]; then
echo echo
echo -e "[${idsCL[LightCyan]} 0${idsCL[Default]}]${idsCL[White]} All Services${idsCL[Default]}" echo -e "[${idsCL[LightCyan]} 0${idsCL[Default]}]${idsCL[White]} All Services${idsCL[Default]}"
b=1; declare -a bsrvcs b=1; declare -a bsrvcs
@@ -1103,9 +1102,8 @@ SERVICEBACKUP(){
echo -en "${idsCL[LightCyan]}Select a service to backup: ${idsCL[White]}" echo -en "${idsCL[LightCyan]}Select a service to backup: ${idsCL[White]}"
read selsrvc read selsrvc
echo echo
# [ ${selsrvc} -eq 0 ] && usrvc=all || usrvc=${bsrvcs[${selsrvc}]} [ ${selsrvc} -eq 0 ] && usrvc=all || usrvc=${bsrvcs[${selsrvc}]}
fi fi
exit
if [ "${usrvc}" == "all" ]; then if [ "${usrvc}" == "all" ]; then
for uasrvc in "${UPDATE_SERVICES[@]}"; do for uasrvc in "${UPDATE_SERVICES[@]}"; do
@@ -1116,7 +1114,7 @@ SERVICEBACKUP(){
done done
elif [ "${usrvc}" != "" ]; then elif [ "${usrvc}" != "" ]; then
if [ "${3}" == "true" ] || [ "${2}" == "true" ]; then if [ "${3}" == "true" ] || [ "${2}" == "true" ] || [ "${1}" == "true" ]; then
echo echo
echo -e "${idsCL[Green]}Backing up ${usrvc^} Service${idsCL[Default]}" echo -e "${idsCL[Green]}Backing up ${usrvc^} Service${idsCL[Default]}"
DIVIDER . lightGreen DIVIDER . lightGreen
@@ -1164,7 +1162,7 @@ SERVICEBACKUP(){
done done
echo -e "${idsCL[Green]}Done${idsCL[Default]}" echo -e "${idsCL[Green]}Done${idsCL[Default]}"
([ "${3}" == "true" ] || [ "${2}" == "true" ]) && SERVICEBACKUPSTART ${usrvc} ([ "${3}" == "true" ] || [ "${2}" == "true" ] || [ "${1}" == "true" ]) && SERVICEBACKUPSTART ${usrvc}
[ "${usrvc}" == "radarr" ] && SERVICEBACKUP ${usrvc}3d ${2} ${3} [ "${usrvc}" == "radarr" ] && SERVICEBACKUP ${usrvc}3d ${2} ${3}
fi fi