Update mm-scripts.sh
This commit is contained in:
@@ -883,8 +883,6 @@ UPDATESERVICE(){
|
||||
echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${!cver}${idsCL[Default]}"
|
||||
|
||||
if [ "${!cver}" != "${installed_ver}" ]; then
|
||||
msg="Installing version"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${installed_ver}${idsCL[Default]}"
|
||||
|
||||
msg="Downloading and updating"
|
||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||
@@ -916,34 +914,24 @@ UPDATESERVICE(){
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
else
|
||||
# msg="Latest Version"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
# echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${installed_ver}${idsCL[Default]}"
|
||||
#
|
||||
# cver=${usrvc}_VER
|
||||
# msg="Current Version"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
# echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${!cver}${idsCL[Default]}"
|
||||
echo -e " ${idsCL[White]}Update Not Needed${idsCL[Green]}${installed_ver}${idsCL[Default]}"
|
||||
echo -e " ${idsCL[LightCyan]} Update Not Needed ${idsCL[Default]}"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
elif [ "${MM_UPDATE_REPO[${usrvc}]}" == "systemd" ]; then
|
||||
if [ "$(apt-get -s upgrade | grep ${usrvc})" != "" ]; then
|
||||
msg="Updating service"; c=0; spc=''; spc1=$((${cw_spc}-${#msg})); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
|
||||
installed_ver=`dpkg -s ${usrvc} | grep Version`
|
||||
# /usr/bin/apt install ${usrvc} >/dev/null 2>&1
|
||||
/bin/systemctl disable ${usrvc} >/dev/null 2>&1
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
else
|
||||
echo -e " ${idsCL[LightCyan]} Update Not Needed ${idsCL[Default]}"
|
||||
|
||||
fi
|
||||
|
||||
msg="Installing version"
|
||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -e "${idsCL[White]}${msg}${spc} : ${idsCL[Green]}${installed_ver}${idsCL[Default]}"
|
||||
|
||||
msg="Updating service"
|
||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[White]}${msg}${spc} : ${idsCL[Default]}"
|
||||
|
||||
installed_ver=`dpkg -s ${usrvc} | grep Version`
|
||||
# /usr/bin/apt install ${usrvc} >/dev/null 2>&1
|
||||
/bin/systemctl disable ${usrvc} >/dev/null 2>&1
|
||||
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user