(simatec) v0.8.2

This commit is contained in:
simatec 2023-01-18 16:46:49 +01:00
parent d2d8771995
commit cc10d5e444
2 changed files with 23 additions and 22 deletions

View file

@ -15,7 +15,7 @@ else
green=`echo -e "\e[1m\e[32m"` green=`echo -e "\e[1m\e[32m"`
greenBold=`echo -e "\e[1m\e[1;32m"` greenBold=`echo -e "\e[1m\e[1;32m"`
redBold=`echo -e "\e[1m\e[1;31m"` redBold=`echo -e "\e[1m\e[1;31m"`
puple=`echo -e "\e[1m\e[35m"` purple=`echo -e "\e[1m\e[35m"`
bold=`echo -e "\e[1m"` bold=`echo -e "\e[1m"`
normal=`echo -en "\e[0m"` normal=`echo -en "\e[0m"`
fi fi
@ -52,36 +52,36 @@ BLA::stop_loading_animation() {
# App Check # App Check
for bin in curl docker git; do for bin in curl docker git; do
if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi if [[ -z $(which ${bin}) ]]; then echo "${redBold}Cannot find ${bin}, exiting...${normal}"; exit 1; fi
done done
# Docker-Compose Check # Docker-Compose Check
if docker compose > /dev/null 2>&1; then if docker compose > /dev/null 2>&1; then
if docker compose version --short | grep "^2." > /dev/null 2>&1; then if docker compose version --short | grep "^2." > /dev/null 2>&1; then
COMPOSE_VERSION=native COMPOSE_VERSION=native
echo -e "${red}Found Docker Compose Plugin (native).${normal}" echo -e "${purple}Found Docker Compose Plugin (native).${normal}"
echo -e "${red}Setting the DOCKER_COMPOSE_VERSION Variable to native${normal}" echo -e "${purple}Setting the DOCKER_COMPOSE_VERSION Variable to native${normal}"
sleep 2 sleep 2
echo -e "${purple}Notice: You´ll have to update this Compose Version via your Package Manager manually!${normal}" echo -e "${purple}Notice: You´ll have to update this Compose Version via your Package Manager manually!${normal}"
else else
echo -e "${red}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}" echo -e "${redBold}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}"
exit 1 exit 1
fi fi
elif docker-compose > /dev/null 2>&1; then elif docker-compose > /dev/null 2>&1; then
if ! [[ $(alias docker-compose 2> /dev/null) ]] ; then if ! [[ $(alias docker-compose 2> /dev/null) ]] ; then
if docker-compose version --short | grep "^2." > /dev/null 2>&1; then if docker-compose version --short | grep "^2." > /dev/null 2>&1; then
COMPOSE_VERSION=standalone COMPOSE_VERSION=standalone
echo -e "${red}Found Docker Compose Standalone.${normal}" echo -e "${purple}Found Docker Compose Standalone.${normal}"
echo -e "${red}Setting the DOCKER_COMPOSE_VERSION Variable to standalone${normal}" echo -e "${purple}Setting the DOCKER_COMPOSE_VERSION Variable to standalone${normal}"
sleep 2 sleep 2
else else
echo -e "${red}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}" echo -e "${redBold}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}"
exit 1 exit 1
fi fi
fi fi
else else
echo -e "${red}Cannot find Docker Compose.${normal}" echo -e "${redBold}Cannot find Docker Compose.${normal}"
exit 1 exit 1
fi fi
@ -151,7 +151,7 @@ if [ ! -f $installPth/.configDone ]; then
case $jn in case $jn in
[Yy]* ) sed -i 's/USE_LETSENCRYPT=.*/USE_LETSENCRYPT="yes"/g' ./piler.conf; break;; [Yy]* ) sed -i 's/USE_LETSENCRYPT=.*/USE_LETSENCRYPT="yes"/g' ./piler.conf; break;;
[Nn]* ) sed -i 's/USE_LETSENCRYPT=.*/USE_LETSENCRYPT="no"/g' ./piler.conf; break;; [Nn]* ) sed -i 's/USE_LETSENCRYPT=.*/USE_LETSENCRYPT="no"/g' ./piler.conf; break;;
* ) echo -e "${red} Please confirm with Y or N.";; * ) echo -e "${redBold} Please confirm with Y or N.${normal}";;
esac esac
done done
@ -171,7 +171,7 @@ if [ ! -f $installPth/.configDone ]; then
case $jn in case $jn in
[Yy]* ) sed -i 's/USE_MAILCOW=.*/USE_MAILCOW=true/g' ./piler.conf; break;; [Yy]* ) sed -i 's/USE_MAILCOW=.*/USE_MAILCOW=true/g' ./piler.conf; break;;
[Nn]* ) sed -i 's/USE_MAILCOW=.*/USE_MAILCOW=false/g' ./piler.conf; break;; [Nn]* ) sed -i 's/USE_MAILCOW=.*/USE_MAILCOW=false/g' ./piler.conf; break;;
* ) echo -e "${red} Please confirm with Y or N.";; * ) echo -e "${redBold} Please confirm with Y or N.${normal}";;
esac esac
done done
@ -222,7 +222,7 @@ while true; do
case $yn in case $yn in
[Yy]* ) apt purge postfix -y; break;; [Yy]* ) apt purge postfix -y; break;;
[Nn]* ) echo -e "${redBold} The installation process is aborted because Postfix has not been uninstalled.!! ${normal}"; exit;; [Nn]* ) echo -e "${redBold} The installation process is aborted because Postfix has not been uninstalled.!! ${normal}"; exit;;
* ) echo -e "${red} Please confirm with y or n.";; * ) echo -e "${redBold} Please confirm with y or n.${normal}";;
esac esac
done done
@ -232,7 +232,7 @@ while true; do
case $yn in case $yn in
[Yy]* ) echo -e "${greenBold}Piler install started!! ${normal}"; break;; [Yy]* ) echo -e "${greenBold}Piler install started!! ${normal}"; break;;
[Nn]* ) echo -e "${redBold}Aborting the Piler installation!! ${normal}"; exit;; [Nn]* ) echo -e "${redBold}Aborting the Piler installation!! ${normal}"; exit;;
* ) echo -e "${red} Please confirm with Y or N.";; * ) echo -e "${redBold} Please confirm with Y or N.${normal}";;
esac esac
done done

View file

@ -50,38 +50,39 @@ BLA::stop_loading_animation() {
####################################################################################### #######################################################################################
# App Check # App Check
for bin in curl docker git; do for bin in curl docker git; do
if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi if [[ -z $(which ${bin}) ]]; then echo "${redBold}Cannot find ${bin}, exiting...${normal}"; exit 1; fi
done done
# Docker-Compose Check # Docker-Compose Check
if docker compose > /dev/null 2>&1; then if docker compose > /dev/null 2>&1; then
if docker compose version --short | grep "^2." > /dev/null 2>&1; then if docker compose version --short | grep "^2." > /dev/null 2>&1; then
COMPOSE_VERSION=native COMPOSE_VERSION=native
echo -e "${red}Found Docker Compose Plugin (native).${normal}" echo -e "${purple}Found Docker Compose Plugin (native).${normal}"
echo -e "${red}Setting the DOCKER_COMPOSE_VERSION Variable to native${normal}" echo -e "${purple}Setting the DOCKER_COMPOSE_VERSION Variable to native${normal}"
sleep 2 sleep 2
echo -e "${purple}Notice: You´ll have to update this Compose Version via your Package Manager manually!${normal}" echo -e "${purple}Notice: You´ll have to update this Compose Version via your Package Manager manually!${normal}"
else else
echo -e "${red}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}" echo -e "${redBold}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}"
exit 1 exit 1
fi fi
elif docker-compose > /dev/null 2>&1; then elif docker-compose > /dev/null 2>&1; then
if ! [[ $(alias docker-compose 2> /dev/null) ]] ; then if ! [[ $(alias docker-compose 2> /dev/null) ]] ; then
if docker-compose version --short | grep "^2." > /dev/null 2>&1; then if docker-compose version --short | grep "^2." > /dev/null 2>&1; then
COMPOSE_VERSION=standalone COMPOSE_VERSION=standalone
echo -e "${red}Found Docker Compose Standalone.${normal}" echo -e "${purple}Found Docker Compose Standalone.${normal}"
echo -e "${red}Setting the DOCKER_COMPOSE_VERSION Variable to standalone${normal}" echo -e "${purple}Setting the DOCKER_COMPOSE_VERSION Variable to standalone${normal}"
sleep 2 sleep 2
else else
echo -e "${red}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}" echo -e "${redBold}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}"
exit 1 exit 1
fi fi
fi fi
else else
echo -e "${red}Cannot find Docker Compose.${normal}" echo -e "${redBold}Cannot find Docker Compose.${normal}"
exit 1 exit 1
fi fi
@ -92,7 +93,7 @@ while true; do
case $yn in case $yn in
[Yy]* ) echo "${greenBold}********* Update started... Please wait... *********${normal}"; break;; [Yy]* ) echo "${greenBold}********* Update started... Please wait... *********${normal}"; break;;
[Nn]* ) echo -e "${redBold} The update is canceled!${normal}"; exit;; [Nn]* ) echo -e "${redBold} The update is canceled!${normal}"; exit;;
* ) echo -e "${red} Please confirm with y or n.";; * ) echo -e "${redBold} Please confirm with y or n.${normal}";;
esac esac
done done