(simatec) v0.8.2
This commit is contained in:
parent
25dc745e4a
commit
ff6626e327
3 changed files with 87 additions and 5 deletions
12
README.md
12
README.md
|
@ -93,7 +93,13 @@ Here the current yml files are downloaded from Github and the containers are upd
|
||||||
|
|
||||||
```
|
```
|
||||||
cd /opt/piler-docker
|
cd /opt/piler-docker
|
||||||
bash update.sh
|
bash install.sh
|
||||||
|
```
|
||||||
|
You will get a selection menu with the following options:
|
||||||
|
|
||||||
|
```
|
||||||
|
1) Install-Piler
|
||||||
|
2) Update-Piler
|
||||||
```
|
```
|
||||||
|
|
||||||
* After a successful update, unused container images can be removed from the system with the following command:
|
* After a successful update, unused container images can be removed from the system with the following command:
|
||||||
|
@ -139,6 +145,10 @@ To leave the container on the console you have to execute 2x `exit`.
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### 0.8.2 (18.01.2023)
|
||||||
|
* (simatec) docker, curl and git Check added
|
||||||
|
* (simatec) Update Config added
|
||||||
|
|
||||||
### 0.8.1 (17.01.2023)
|
### 0.8.1 (17.01.2023)
|
||||||
* (simatec) Docker Compose Check added
|
* (simatec) Docker Compose Check added
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,11 @@ BLA::stop_loading_animation() {
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
|
|
||||||
|
# App Check
|
||||||
|
for bin in curl docker git; do
|
||||||
|
if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi
|
||||||
|
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
|
||||||
|
@ -80,6 +85,8 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#######################################################################################
|
||||||
|
|
||||||
# Path-Settings
|
# Path-Settings
|
||||||
installPth="/opt/piler-docker"
|
installPth="/opt/piler-docker"
|
||||||
configPth="/opt/piler-docker/config"
|
configPth="/opt/piler-docker/config"
|
||||||
|
@ -88,7 +95,7 @@ etcPth="/var/lib/docker/volumes/piler-docker_piler_etc/_data"
|
||||||
# Load config
|
# Load config
|
||||||
. ./piler.conf
|
. ./piler.conf
|
||||||
|
|
||||||
############################## Installer Settings #######################################
|
############################## Installer Settings ######################################
|
||||||
|
|
||||||
if [ ! -f $installPth/.configDone ]; then
|
if [ ! -f $installPth/.configDone ]; then
|
||||||
# Piler-Domain
|
# Piler-Domain
|
||||||
|
@ -192,6 +199,21 @@ if [ ! -f $installPth/.configDone ]; then
|
||||||
|
|
||||||
# config done
|
# config done
|
||||||
touch $installPth/.configDone
|
touch $installPth/.configDone
|
||||||
|
|
||||||
|
elif [ -f $installPth/.configDone ]; then
|
||||||
|
select name in Install-Piler Update-Piler
|
||||||
|
do
|
||||||
|
if [ $name = "Install-Piler" ]; then
|
||||||
|
echo
|
||||||
|
echo "${blue}Ready for: $name${normal}" && break
|
||||||
|
echo
|
||||||
|
elif [ $name = "Update-Piler" ]; then
|
||||||
|
echo
|
||||||
|
echo "${blue}Ready for: $name${normal}"
|
||||||
|
echo
|
||||||
|
bash $installPth/update.sh && exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# uninstall Postfix
|
# uninstall Postfix
|
||||||
|
|
56
update.sh
56
update.sh
|
@ -50,6 +50,43 @@ BLA::stop_loading_animation() {
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
|
|
||||||
|
# App Check
|
||||||
|
for bin in curl docker git; do
|
||||||
|
if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Docker-Compose Check
|
||||||
|
if docker compose > /dev/null 2>&1; then
|
||||||
|
if docker compose version --short | grep "^2." > /dev/null 2>&1; then
|
||||||
|
COMPOSE_VERSION=native
|
||||||
|
echo -e "${red}Found Docker Compose Plugin (native).${normal}"
|
||||||
|
echo -e "${red}Setting the DOCKER_COMPOSE_VERSION Variable to native${normal}"
|
||||||
|
sleep 2
|
||||||
|
echo -e "${purple}Notice: You´ll have to update this Compose Version via your Package Manager manually!${normal}"
|
||||||
|
else
|
||||||
|
echo -e "${red}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif docker-compose > /dev/null 2>&1; then
|
||||||
|
if ! [[ $(alias docker-compose 2> /dev/null) ]] ; then
|
||||||
|
if docker-compose version --short | grep "^2." > /dev/null 2>&1; then
|
||||||
|
COMPOSE_VERSION=standalone
|
||||||
|
echo -e "${red}Found Docker Compose Standalone.${normal}"
|
||||||
|
echo -e "${red}Setting the DOCKER_COMPOSE_VERSION Variable to standalone${normal}"
|
||||||
|
sleep 2
|
||||||
|
else
|
||||||
|
echo -e "${red}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
echo -e "${red}Cannot find Docker Compose.${normal}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#######################################################################################
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -ep "Do you want to perform the update?? (y/n): " yn
|
read -ep "Do you want to perform the update?? (y/n): " yn
|
||||||
case $yn in
|
case $yn in
|
||||||
|
@ -96,7 +133,11 @@ echo
|
||||||
# old docker stop
|
# old docker stop
|
||||||
cd $installPth
|
cd $installPth
|
||||||
|
|
||||||
docker-compose down
|
if [ $COMPOSE_VERSION = native ]; then
|
||||||
|
docker compose down
|
||||||
|
else
|
||||||
|
docker-compose down
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$USE_LETSENCRYPT" = "yes" ]; then
|
if [ "$USE_LETSENCRYPT" = "yes" ]; then
|
||||||
cp $configPth/piler-ssl.yml $installPth/docker-compose.yml
|
cp $configPth/piler-ssl.yml $installPth/docker-compose.yml
|
||||||
|
@ -123,7 +164,11 @@ if [ "$USE_LETSENCRYPT" = "yes" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker-compose up --force-recreate --build -d
|
if [ $COMPOSE_VERSION = native ]; then
|
||||||
|
docker compose up --force-recreate --build -d
|
||||||
|
else
|
||||||
|
docker-compose up --force-recreate --build -d
|
||||||
|
fi
|
||||||
|
|
||||||
echo "${blue}********* Piler started... Please wait... *********${normal}"
|
echo "${blue}********* Piler started... Please wait... *********${normal}"
|
||||||
|
|
||||||
|
@ -250,7 +295,12 @@ echo "${blue}${HLINE}${normal}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
cd $installPth
|
cd $installPth
|
||||||
docker-compose restart piler
|
|
||||||
|
if [ $COMPOSE_VERSION = native ]; then
|
||||||
|
docker compose restart piler
|
||||||
|
else
|
||||||
|
docker-compose restart piler
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "${greenBold}${HLINE}"
|
echo "${greenBold}${HLINE}"
|
||||||
|
|
Loading…
Reference in a new issue