(simatec) Beta v0.8.3
This commit is contained in:
88
update.sh
88
update.sh
@@ -21,6 +21,7 @@ else
|
||||
fi
|
||||
|
||||
HLINE="=================================================================="
|
||||
HLINE_SMALL="==============================="
|
||||
|
||||
BLA_metro=( 0.2 ' ' '= ' '== ' '=== ' ' ===' ' ==' ' =' )
|
||||
|
||||
@@ -97,19 +98,19 @@ while true; do
|
||||
esac
|
||||
done
|
||||
|
||||
installPth="/opt/piler-docker"
|
||||
configPth="/opt/piler-docker/config"
|
||||
installPth=`pwd`
|
||||
configPth="$installPth/config"
|
||||
etcPth="/var/lib/docker/volumes/piler-docker_piler_etc/_data"
|
||||
|
||||
# config load
|
||||
. ./piler.conf
|
||||
|
||||
if [ ! -f $installPth/.env ]; then
|
||||
ln -s ./piler.conf .env
|
||||
ln -s ./piler.conf .env
|
||||
fi
|
||||
|
||||
if [ -f $installPth/docker-compose.yml ]; then
|
||||
rm $installPth/docker-compose.yml
|
||||
rm $installPth/docker-compose.yml
|
||||
fi
|
||||
|
||||
# Download yml update
|
||||
@@ -119,31 +120,38 @@ echo "${greenBold} Download Update files for Piler"
|
||||
echo "${greenBold}${HLINE}${normal}"
|
||||
echo
|
||||
|
||||
#cd $configPth
|
||||
# Update Files
|
||||
for ymlUpdate in piler-default.yml piler-ssl.yml; do
|
||||
echo
|
||||
echo "${purple}${HLINE}${HLINE_SMALL}"
|
||||
echo "${purple}****** Download Update $ymlUpdate ******"
|
||||
curl -o $configPth/$ymlUpdate https://raw.githubusercontent.com/simatec/piler-docker/main/config/$ymlUpdate
|
||||
echo "${purple}${HLINE}${HLINE_SMALL}${normal}"
|
||||
echo
|
||||
done
|
||||
|
||||
# Update yml
|
||||
echo
|
||||
echo "${purple}${HLINE}"
|
||||
echo "${purple}****** Download Update files piler-default.yml ******"
|
||||
curl -o $configPth/piler-default.yml https://raw.githubusercontent.com/simatec/piler-docker/main/config/piler-default.yml
|
||||
echo "${purple}****** Download Update files piler-ssl.yml ******"
|
||||
curl -o $configPth/piler-ssl.yml https://raw.githubusercontent.com/simatec/piler-docker/main/config/piler-ssl.yml
|
||||
echo "${purple}${HLINE}${normal}"
|
||||
echo
|
||||
for fileUpdate in install-piler.sh LICENSE piler.conf.example; do
|
||||
echo
|
||||
echo "${purple}${HLINE}${HLINE_SMALL}"
|
||||
echo "${purple}****** Download Update $fileUpdate ******"
|
||||
curl -o $installPth/$fileUpdate https://raw.githubusercontent.com/simatec/piler-docker/main/config/$fileUpdate
|
||||
echo "${purple}${HLINE}${HLINE_SMALL}${normal}"
|
||||
echo
|
||||
done
|
||||
|
||||
# old docker stop
|
||||
cd $installPth
|
||||
|
||||
if [ $COMPOSE_VERSION = native ]; then
|
||||
docker compose down
|
||||
docker compose down
|
||||
else
|
||||
docker-compose down
|
||||
docker-compose down
|
||||
fi
|
||||
|
||||
if [ "$USE_LETSENCRYPT" = "yes" ]; then
|
||||
cp $configPth/piler-ssl.yml $installPth/docker-compose.yml
|
||||
cp $configPth/piler-ssl.yml $installPth/docker-compose.yml
|
||||
else
|
||||
cp $configPth/piler-default.yml $installPth/docker-compose.yml
|
||||
cp $configPth/piler-default.yml $installPth/docker-compose.yml
|
||||
fi
|
||||
|
||||
# start Update Container
|
||||
@@ -155,20 +163,20 @@ echo
|
||||
|
||||
if [ "$USE_LETSENCRYPT" = "yes" ]; then
|
||||
if ! docker network ls | grep -o "nginx-proxy"; then
|
||||
docker network create nginx-proxy
|
||||
docker network create nginx-proxy
|
||||
|
||||
echo
|
||||
echo "${blue}${HLINE}"
|
||||
echo "${blue} docker network created"
|
||||
echo "${blue}${HLINE}${normal}"
|
||||
echo
|
||||
echo
|
||||
echo "${blue}${HLINE}"
|
||||
echo "${blue} docker network created"
|
||||
echo "${blue}${HLINE}${normal}"
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $COMPOSE_VERSION = native ]; then
|
||||
docker compose up --force-recreate --build -d
|
||||
docker compose up --force-recreate --build -d
|
||||
else
|
||||
docker-compose up --force-recreate --build -d
|
||||
docker-compose up --force-recreate --build -d
|
||||
fi
|
||||
|
||||
echo "${blue}********* Piler started... Please wait... *********${normal}"
|
||||
@@ -178,10 +186,10 @@ sleep 20
|
||||
BLA::stop_loading_animation
|
||||
|
||||
if [ ! -f $etcPth/config-site.php.bak ]; then
|
||||
cp $etcPth/config-site.php $etcPth/config-site.php.bak
|
||||
cp $etcPth/config-site.php $etcPth/config-site.php.bak
|
||||
else
|
||||
rm $etcPth/config-site.php
|
||||
cp $etcPth/config-site.php.bak $etcPth/config-site.php
|
||||
rm $etcPth/config-site.php
|
||||
cp $etcPth/config-site.php.bak $etcPth/config-site.php
|
||||
fi
|
||||
|
||||
echo
|
||||
@@ -275,10 +283,10 @@ fi
|
||||
# add config settings
|
||||
|
||||
if [ ! -f $etcPth/piler.conf.bak ]; then
|
||||
cp $etcPth/piler.conf $etcPth/piler.conf.bak
|
||||
cp $etcPth/piler.conf $etcPth/piler.conf.bak
|
||||
else
|
||||
rm $etcPth/piler.conf
|
||||
cp $etcPth/piler.conf.bak $etcPth/piler.conf
|
||||
rm $etcPth/piler.conf
|
||||
cp $etcPth/piler.conf.bak $etcPth/piler.conf
|
||||
fi
|
||||
|
||||
sed -i "s/default_retention_days=.*/default_retention_days=$DEFAULT_RETENTION_DAYS/" $etcPth/piler.conf
|
||||
@@ -298,9 +306,9 @@ echo
|
||||
cd $installPth
|
||||
|
||||
if [ $COMPOSE_VERSION = native ]; then
|
||||
docker compose restart piler
|
||||
docker compose restart piler
|
||||
else
|
||||
docker-compose restart piler
|
||||
docker-compose restart piler
|
||||
fi
|
||||
|
||||
echo
|
||||
@@ -309,14 +317,16 @@ echo "${greenBold} Piler Update completed successfully"
|
||||
echo "${greenBold}${HLINE}${normal}"
|
||||
echo
|
||||
echo
|
||||
echo "${greenBold}${HLINE}"
|
||||
echo "${greenBold}${HLINE}${HLINE_SMALL}"
|
||||
|
||||
if [ "$USE_LETSENCRYPT" = "yes" ]; then
|
||||
echo "${greenBold}you can start in your Browser with https://${PILER_DOMAIN}!"
|
||||
echo "${greenBold}you can start in your Browser with https://${PILER_DOMAIN}!"
|
||||
else
|
||||
echo "${greenBold}you can start in your Browser with:"
|
||||
echo "${greenBold}http://${PILER_DOMAIN} or http://local-ip"
|
||||
echo "${greenBold}you can start in your Browser with:"
|
||||
echo "${greenBold}http://${PILER_DOMAIN} or http://local-ip"
|
||||
fi
|
||||
echo "${greenBold}${HLINE}${normal}"
|
||||
|
||||
echo "${greenBold}${HLINE}${HLINE_SMALL}${normal}"
|
||||
|
||||
echo
|
||||
echo "${blue}${HLINE}"
|
||||
|
||||
Reference in New Issue
Block a user