From de83ced596863b71aadd45eeaaeacb1bd471d0fb Mon Sep 17 00:00:00 2001 From: simatec Date: Tue, 17 Jan 2023 13:35:20 +0100 Subject: [PATCH 01/13] (simatec) Beta 0.8.0 --- README.md | 10 ++-- install-piler.sh | 137 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 132 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 8eea5e4..61c32b8 100644 --- a/README.md +++ b/README.md @@ -65,13 +65,8 @@ git clone https://github.com/simatec/piler-docker.git cd /opt/piler-docker ``` -* configure your Piler settings -``` -nano piler.conf -``` - -* after config start the Install +* start the Install ``` bash install-piler.sh @@ -144,6 +139,9 @@ To leave the container on the console you have to execute 2x `exit`. ## Changelog +### 0.8.0 (17.01.2023) +* (simatec) Config-Menu for Installer added + ### 0.7.0 (15.01.2023) * (simatec) New Volumes added * (simatec) Fix Installer diff --git a/install-piler.sh b/install-piler.sh index cc58a5a..3b441f2 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -49,6 +49,8 @@ BLA::stop_loading_animation() { } ####################################################################################### + +# Path-Settings installPth="/opt/piler-docker" configPth="/opt/piler-docker/config" etcPth="/var/lib/docker/volumes/piler-docker_piler_etc/_data" @@ -56,6 +58,132 @@ etcPth="/var/lib/docker/volumes/piler-docker_piler_etc/_data" # Load config . ./piler.conf +############################## Installer Settings ####################################### + +# Piler-Domain +read -ep "Please set your Piler-Domain (Enter for default: piler.example.com): " pilerDomain +pilerDomain=${pilerDomain:=piler.example.com} +sed -i 's/PILER_DOMAIN=.*/PILER_DOMAIN="'$pilerDomain'"/g' ./piler.conf + +# Piler-Admin-Mail +read -ep "Please set your Mailserver Admin Mail (Enter for default: admin@example.com): " pilerAdminMail +pilerAdminMail=${pilerAdminMail:=admin@example.com} +sed -i 's/SUPPORT_MAIL=.*/SUPPORT_MAIL="'$pilerAdminMail'"/g' ./piler.conf + +# retention Days +read -ep "Please set retention days (Enter for default: 2555 Days ~ 7 Years): " retentionDays +retentionDays=${retentionDays:=2555} +sed -i 's/DEFAULT_RETENTION_DAYS=.*/DEFAULT_RETENTION_DAYS="'$retentionDays'"/g' ./piler.conf + +# Smarthost +read -ep "Please set your Smarthost (Enter for default: 127.0.0.1). Default settings can be used here!!: " pilerSmartHost +pilerSmartHost=${pilerSmartHost:=127.0.0.1} +sed -i 's/SMARTHOST=.*/SMARTHOST="'$pilerSmartHost'"/g' ./piler.conf + +# IMAP Server +read -ep "Please set your IMAP Server (Enter for default: imap.example.com): " imapServer +imapServer=${imapServer:=imap.example.com} +sed -i 's/IMAP_SERVER=.*/IMAP_SERVER="'$imapServer'"/g' ./piler.conf + +# Timezone +read -ep "Please set your Timezone (Enter for default: Europe/Berlin): " timeZone +timeZone=${timeZone:=Europe/Berlin} +timeZone="${timeZone////\\/}" +sed -i 's/TIME_ZONE=.*/TIME_ZONE="'$timeZone'"/g' ./piler.conf + +# MySql Database +read -ep "Please set your MySql Database (Enter for default: piler): " pilerDataBase +pilerDataBase=${pilerDataBase:=piler} +sed -i 's/MYSQL_DATABASE=.*/MYSQL_DATABASE="'$pilerDataBase'"/g' ./piler.conf + +# MySql User +read -ep "Please set your MySql User (Enter for default: piler): " pilerUser +pilerUser=${pilerUser:=piler} +sed -i 's/MYSQL_USER=.*/MYSQL_USER="'$pilerUser'"/g' ./piler.conf + +# MySql Password +read -sp "Please set your MySql Password: " pilerPassword +pilerPassword=$pilerPassword +sed -i 's/MYSQL_PASSWORD=.*/MYSQL_PASSWORD="'$pilerPassword'"/g' ./piler.conf +echo + +# use Let's Encrypt +while true; do + read -ep "Enabled / Disabled (yes/no) Let's Encrypt? For local Run disabled / Y|N: " jn + case $jn in + [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;; + * ) echo -e "${red} Please confirm with Y or N.";; + esac +done + +# reload config +. ./piler.conf + +# Let's Encrypt registration contact information +if [ "$USE_LETSENCRYPT" = "yes" ]; then + read -ep "Please set Let's Encrypt registration contact information (Enter for default: admin@example.com): " acmeContact + acmeContact=${acmeContact:=admin@example.com} + sed -i 's/LETSENCRYPT_EMAIL=.*/LETSENCRYPT_EMAIL="'$acmeContact'"/g' ./piler.conf +fi + +# use Mailcow +while true; do + read -ep "If Use Mailcow API Options (yes/no)? / Y|N: " jn + case $jn in + [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;; + * ) echo -e "${red} Please confirm with Y or N.";; + esac +done + +# reload config +. ./piler.conf + +if [ "$USE_MAILCOW" = true ]; then + # Mailcow API-Key + read -ep "Please set your Mailcow API-Key: " apiKey + apiKey=$apiKey + sed -i 's/MAILCOW_APIKEY=.*/MAILCOW_APIKEY="'$apiKey'"/g' ./piler.conf + + # Mailcow Host Domain + read -ep "Please set your Mailcow Host Domain (Enter for default: $imapServer): " mailcowHost + mailcowHost=${mailcowHost:=$imapServer} + sed -i 's/MAILCOW_HOST=.*/MAILCOW_HOST="'$mailcowHost'"/g' ./piler.conf +fi + +echo +echo "${blue}${HLINE}" +echo "All settings were saved in the piler.conf file" +echo "and can be adjusted there at any time." +echo "${blue}${HLINE}${normal}" +echo + +# uninstall Postfix +while true; do + read -ep "Postfix must be uninstalled prior to installation. Do you want to uninstall Postfix now? (y/n): " yn + case $yn in + [Yy]* ) apt purge postfix -y; break;; + [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.";; + esac +done + +# start piler install +while true; do + read -ep "Do you want to start the Piler installation now? / Y|N: " yn + case $yn in + [Yy]* ) echo -e "${greenBold}Piler install started!! ${normal}"; break;; + [Nn]* ) echo -e "${redBold}Aborting the Piler installation!! ${normal}"; exit;; + * ) echo -e "${red} Please confirm with Y or N.";; + esac +done + +######################################################################################### + +# reload config +. ./piler.conf + if [ ! -f $installPth/.env ]; then ln -s ./piler.conf .env fi @@ -70,15 +198,6 @@ else cp $configPth/piler-default.yml $installPth/docker-compose.yml fi -while true; do - read -ep "Postfix must be uninstalled prior to installation. Do you want to uninstall Postfix now? (y/n): " yn - case $yn in - [Yy]* ) apt purge postfix -y; break;; - [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.";; - esac -done - # old docker stop cd $installPth docker-compose down From 5a554c7ae59e552b0b9ebcaaad9fb4fc3a42c46e Mon Sep 17 00:00:00 2001 From: simatec Date: Tue, 17 Jan 2023 13:55:19 +0100 Subject: [PATCH 02/13] (simatec) Beta 0.8.0 --- install-piler.sh | 177 ++++++++++++++++++++++++----------------------- 1 file changed, 91 insertions(+), 86 deletions(-) diff --git a/install-piler.sh b/install-piler.sh index 3b441f2..795bc0a 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -60,105 +60,110 @@ etcPth="/var/lib/docker/volumes/piler-docker_piler_etc/_data" ############################## Installer Settings ####################################### -# Piler-Domain -read -ep "Please set your Piler-Domain (Enter for default: piler.example.com): " pilerDomain -pilerDomain=${pilerDomain:=piler.example.com} -sed -i 's/PILER_DOMAIN=.*/PILER_DOMAIN="'$pilerDomain'"/g' ./piler.conf +if [ ! -f $installPth/.configDone ]; then + # Piler-Domain + read -ep "Please set your Piler-Domain (Enter for default: $PILER_DOMAIN): " pilerDomain + pilerDomain=${pilerDomain:=$PILER_DOMAIN} + sed -i 's/PILER_DOMAIN=.*/PILER_DOMAIN="'$pilerDomain'"/g' ./piler.conf -# Piler-Admin-Mail -read -ep "Please set your Mailserver Admin Mail (Enter for default: admin@example.com): " pilerAdminMail -pilerAdminMail=${pilerAdminMail:=admin@example.com} -sed -i 's/SUPPORT_MAIL=.*/SUPPORT_MAIL="'$pilerAdminMail'"/g' ./piler.conf + # Piler-Admin-Mail + read -ep "Please set your Mailserver Admin Mail (Enter for default: $SUPPORT_MAIL): " pilerAdminMail + pilerAdminMail=${pilerAdminMail:=$SUPPORT_MAIL} + sed -i 's/SUPPORT_MAIL=.*/SUPPORT_MAIL="'$pilerAdminMail'"/g' ./piler.conf -# retention Days -read -ep "Please set retention days (Enter for default: 2555 Days ~ 7 Years): " retentionDays -retentionDays=${retentionDays:=2555} -sed -i 's/DEFAULT_RETENTION_DAYS=.*/DEFAULT_RETENTION_DAYS="'$retentionDays'"/g' ./piler.conf + # retention Days + read -ep "Please set retention days (Enter for default: $DEFAULT_RETENTION_DAYS Days): " retentionDays + retentionDays=${retentionDays:=$DEFAULT_RETENTION_DAYS Days} + sed -i 's/DEFAULT_RETENTION_DAYS=.*/DEFAULT_RETENTION_DAYS="'$retentionDays'"/g' ./piler.conf -# Smarthost -read -ep "Please set your Smarthost (Enter for default: 127.0.0.1). Default settings can be used here!!: " pilerSmartHost -pilerSmartHost=${pilerSmartHost:=127.0.0.1} -sed -i 's/SMARTHOST=.*/SMARTHOST="'$pilerSmartHost'"/g' ./piler.conf + # Smarthost + read -ep "Please set your Smarthost (Enter for default: $SMARTHOST). Default settings can be used here!!: " pilerSmartHost + pilerSmartHost=${pilerSmartHost:=$SMARTHOST} + sed -i 's/SMARTHOST=.*/SMARTHOST="'$pilerSmartHost'"/g' ./piler.conf -# IMAP Server -read -ep "Please set your IMAP Server (Enter for default: imap.example.com): " imapServer -imapServer=${imapServer:=imap.example.com} -sed -i 's/IMAP_SERVER=.*/IMAP_SERVER="'$imapServer'"/g' ./piler.conf + # IMAP Server + read -ep "Please set your IMAP Server (Enter for default: $IMAP_SERVER): " imapServer + imapServer=${imapServer:=$IMAP_SERVER} + sed -i 's/IMAP_SERVER=.*/IMAP_SERVER="'$imapServer'"/g' ./piler.conf -# Timezone -read -ep "Please set your Timezone (Enter for default: Europe/Berlin): " timeZone -timeZone=${timeZone:=Europe/Berlin} -timeZone="${timeZone////\\/}" -sed -i 's/TIME_ZONE=.*/TIME_ZONE="'$timeZone'"/g' ./piler.conf + # Timezone + read -ep "Please set your Timezone (Enter for default: $TIME_ZONE): " timeZone + timeZone=${timeZone:=$TIME_ZONE} + timeZone="${timeZone////\\/}" + sed -i 's/TIME_ZONE=.*/TIME_ZONE="'$timeZone'"/g' ./piler.conf -# MySql Database -read -ep "Please set your MySql Database (Enter for default: piler): " pilerDataBase -pilerDataBase=${pilerDataBase:=piler} -sed -i 's/MYSQL_DATABASE=.*/MYSQL_DATABASE="'$pilerDataBase'"/g' ./piler.conf + # MySql Database + read -ep "Please set your MySql Database (Enter for default: $MYSQL_DATABASE): " pilerDataBase + pilerDataBase=${pilerDataBase:=$MYSQL_DATABASE} + sed -i 's/MYSQL_DATABASE=.*/MYSQL_DATABASE="'$pilerDataBase'"/g' ./piler.conf -# MySql User -read -ep "Please set your MySql User (Enter for default: piler): " pilerUser -pilerUser=${pilerUser:=piler} -sed -i 's/MYSQL_USER=.*/MYSQL_USER="'$pilerUser'"/g' ./piler.conf + # MySql User + read -ep "Please set your MySql User (Enter for default: $MYSQL_USER): " pilerUser + pilerUser=${pilerUser:=$MYSQL_USER} + sed -i 's/MYSQL_USER=.*/MYSQL_USER="'$pilerUser'"/g' ./piler.conf -# MySql Password -read -sp "Please set your MySql Password: " pilerPassword -pilerPassword=$pilerPassword -sed -i 's/MYSQL_PASSWORD=.*/MYSQL_PASSWORD="'$pilerPassword'"/g' ./piler.conf -echo + # MySql Password + read -sp "Please set your MySql Password: " pilerPassword + pilerPassword=$pilerPassword + sed -i 's/MYSQL_PASSWORD=.*/MYSQL_PASSWORD="'$pilerPassword'"/g' ./piler.conf + echo -# use Let's Encrypt -while true; do - read -ep "Enabled / Disabled (yes/no) Let's Encrypt? For local Run disabled / Y|N: " jn - case $jn in - [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;; - * ) echo -e "${red} Please confirm with Y or N.";; - esac -done + # use Let's Encrypt + while true; do + read -ep "Enabled / Disabled (yes/no) Let's Encrypt? For local Run disabled / Y|N: " jn + case $jn in + [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;; + * ) echo -e "${red} Please confirm with Y or N.";; + esac + done -# reload config -. ./piler.conf + # reload config + . ./piler.conf -# Let's Encrypt registration contact information -if [ "$USE_LETSENCRYPT" = "yes" ]; then - read -ep "Please set Let's Encrypt registration contact information (Enter for default: admin@example.com): " acmeContact - acmeContact=${acmeContact:=admin@example.com} - sed -i 's/LETSENCRYPT_EMAIL=.*/LETSENCRYPT_EMAIL="'$acmeContact'"/g' ./piler.conf + # Let's Encrypt registration contact information + if [ "$USE_LETSENCRYPT" = "yes" ]; then + read -ep "Please set Let's Encrypt registration contact information (Enter for default: $LETSENCRYPT_EMAIL): " acmeContact + acmeContact=${acmeContact:=$LETSENCRYPT_EMAIL} + sed -i 's/LETSENCRYPT_EMAIL=.*/LETSENCRYPT_EMAIL="'$acmeContact'"/g' ./piler.conf + fi + + # use Mailcow + while true; do + read -ep "If Use Mailcow API Options (yes/no)? / Y|N: " jn + case $jn in + [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;; + * ) echo -e "${red} Please confirm with Y or N.";; + esac + done + + # reload config + . ./piler.conf + + if [ "$USE_MAILCOW" = true ]; then + # Mailcow API-Key + read -ep "Please set your Mailcow API-Key (current: $MAILCOW_APIKEY): " apiKey + apiKey=${apiKey:=$MAILCOW_APIKEY} + sed -i 's/MAILCOW_APIKEY=.*/MAILCOW_APIKEY="'$apiKey'"/g' ./piler.conf + + # Mailcow Host Domain + read -ep "Please set your Mailcow Host Domain (Enter for default: $imapServer): " mailcowHost + mailcowHost=${mailcowHost:=$imapServer} + sed -i 's/MAILCOW_HOST=.*/MAILCOW_HOST="'$mailcowHost'"/g' ./piler.conf + fi + + echo + echo "${blue}${HLINE}" + echo "All settings were saved in the piler.conf file" + echo "and can be adjusted there at any time." + echo "${blue}${HLINE}${normal}" + echo + + # config done + touch $installPth/.configDone fi -# use Mailcow -while true; do - read -ep "If Use Mailcow API Options (yes/no)? / Y|N: " jn - case $jn in - [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;; - * ) echo -e "${red} Please confirm with Y or N.";; - esac -done - -# reload config -. ./piler.conf - -if [ "$USE_MAILCOW" = true ]; then - # Mailcow API-Key - read -ep "Please set your Mailcow API-Key: " apiKey - apiKey=$apiKey - sed -i 's/MAILCOW_APIKEY=.*/MAILCOW_APIKEY="'$apiKey'"/g' ./piler.conf - - # Mailcow Host Domain - read -ep "Please set your Mailcow Host Domain (Enter for default: $imapServer): " mailcowHost - mailcowHost=${mailcowHost:=$imapServer} - sed -i 's/MAILCOW_HOST=.*/MAILCOW_HOST="'$mailcowHost'"/g' ./piler.conf -fi - -echo -echo "${blue}${HLINE}" -echo "All settings were saved in the piler.conf file" -echo "and can be adjusted there at any time." -echo "${blue}${HLINE}${normal}" -echo - # uninstall Postfix while true; do read -ep "Postfix must be uninstalled prior to installation. Do you want to uninstall Postfix now? (y/n): " yn From 25dc745e4ad5ab05d621727330704d7ad0cadb5a Mon Sep 17 00:00:00 2001 From: simatec Date: Tue, 17 Jan 2023 15:57:53 +0100 Subject: [PATCH 03/13] (simatec) Beta 0.8.1 --- README.md | 3 +++ install-piler.sh | 52 +++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 61c32b8..9ae1075 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,9 @@ To leave the container on the console you have to execute 2x `exit`. ## Changelog +### 0.8.1 (17.01.2023) +* (simatec) Docker Compose Check added + ### 0.8.0 (17.01.2023) * (simatec) Config-Menu for Installer added diff --git a/install-piler.sh b/install-piler.sh index 795bc0a..e5f8779 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -50,6 +50,36 @@ BLA::stop_loading_animation() { ####################################################################################### +# 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 + # Path-Settings installPth="/opt/piler-docker" configPth="/opt/piler-docker/config" @@ -205,7 +235,12 @@ fi # old docker stop cd $installPth -docker-compose down + +if [ $COMPOSE_VERSION = native ]; then + docker compose down +else + docker-compose down +fi # docker start echo @@ -228,7 +263,12 @@ if [ "$USE_LETSENCRYPT" = "yes" ]; then fi fi -docker-compose up -d +if [ $COMPOSE_VERSION = native ]; then + docker compose up -d +else + docker-compose up -d +fi + echo "${blue}********* Piler started... Please wait... *********" @@ -361,7 +401,13 @@ echo "${blue}${HLINE}${normal}" echo cd $installPth -docker-compose restart piler + +if [ $COMPOSE_VERSION = native ]; then + docker compose restart piler +else + docker-compose restart piler +fi + echo echo "${greenBold}${HLINE}" From ff6626e32762f87895e18818ed72d701a95dd97b Mon Sep 17 00:00:00 2001 From: simatec Date: Wed, 18 Jan 2023 16:26:51 +0100 Subject: [PATCH 04/13] (simatec) v0.8.2 --- README.md | 12 ++++++++++- install-piler.sh | 24 ++++++++++++++++++++- update.sh | 56 +++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 87 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9ae1075..79eaa4f 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,13 @@ Here the current yml files are downloaded from Github and the containers are upd ``` 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: @@ -139,6 +145,10 @@ To leave the container on the console you have to execute 2x `exit`. ## Changelog +### 0.8.2 (18.01.2023) +* (simatec) docker, curl and git Check added +* (simatec) Update Config added + ### 0.8.1 (17.01.2023) * (simatec) Docker Compose Check added diff --git a/install-piler.sh b/install-piler.sh index e5f8779..e9c6a25 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -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 if docker compose > /dev/null 2>&1; then if docker compose version --short | grep "^2." > /dev/null 2>&1; then @@ -80,6 +85,8 @@ else exit 1 fi +####################################################################################### + # Path-Settings installPth="/opt/piler-docker" configPth="/opt/piler-docker/config" @@ -88,7 +95,7 @@ etcPth="/var/lib/docker/volumes/piler-docker_piler_etc/_data" # Load config . ./piler.conf -############################## Installer Settings ####################################### +############################## Installer Settings ###################################### if [ ! -f $installPth/.configDone ]; then # Piler-Domain @@ -192,6 +199,21 @@ if [ ! -f $installPth/.configDone ]; then # config done 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 # uninstall Postfix diff --git a/update.sh b/update.sh index f87233b..c254381 100644 --- a/update.sh +++ b/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 read -ep "Do you want to perform the update?? (y/n): " yn case $yn in @@ -96,7 +133,11 @@ echo # old docker stop cd $installPth -docker-compose down +if [ $COMPOSE_VERSION = native ]; then + docker compose down +else + docker-compose down +fi if [ "$USE_LETSENCRYPT" = "yes" ]; then cp $configPth/piler-ssl.yml $installPth/docker-compose.yml @@ -123,7 +164,11 @@ if [ "$USE_LETSENCRYPT" = "yes" ]; then 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}" @@ -250,7 +295,12 @@ echo "${blue}${HLINE}${normal}" echo cd $installPth -docker-compose restart piler + +if [ $COMPOSE_VERSION = native ]; then + docker compose restart piler +else + docker-compose restart piler +fi echo echo "${greenBold}${HLINE}" From d2d87719957fa2887bc5844944219935b11d0c24 Mon Sep 17 00:00:00 2001 From: simatec Date: Wed, 18 Jan 2023 16:31:03 +0100 Subject: [PATCH 05/13] (simatec) v0.8.2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 79eaa4f..72c1aa8 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ Here the current yml files are downloaded from Github and the containers are upd ``` cd /opt/piler-docker -bash install.sh +bash install-piler.sh ``` You will get a selection menu with the following options: From cc10d5e4444a1e9ccf94c772c98a6b1ccba7f10b Mon Sep 17 00:00:00 2001 From: simatec Date: Wed, 18 Jan 2023 16:46:49 +0100 Subject: [PATCH 06/13] (simatec) v0.8.2 --- install-piler.sh | 26 +++++++++++++------------- update.sh | 19 ++++++++++--------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/install-piler.sh b/install-piler.sh index e9c6a25..dbff82a 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -15,7 +15,7 @@ else green=`echo -e "\e[1m\e[32m"` greenBold=`echo -e "\e[1m\e[1;32m"` 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"` normal=`echo -en "\e[0m"` fi @@ -52,36 +52,36 @@ 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 + if [[ -z $(which ${bin}) ]]; then echo "${redBold}Cannot find ${bin}, exiting...${normal}"; 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}" + echo -e "${purple}Found Docker Compose Plugin (native).${normal}" + echo -e "${purple}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}" + echo -e "${redBold}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}" + echo -e "${purple}Found Docker Compose Standalone.${normal}" + echo -e "${purple}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}" + echo -e "${redBold}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}" + echo -e "${redBold}Cannot find Docker Compose.${normal}" exit 1 fi @@ -151,7 +151,7 @@ if [ ! -f $installPth/.configDone ]; then case $jn in [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;; - * ) echo -e "${red} Please confirm with Y or N.";; + * ) echo -e "${redBold} Please confirm with Y or N.${normal}";; esac done @@ -171,7 +171,7 @@ if [ ! -f $installPth/.configDone ]; then case $jn in [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;; - * ) echo -e "${red} Please confirm with Y or N.";; + * ) echo -e "${redBold} Please confirm with Y or N.${normal}";; esac done @@ -222,7 +222,7 @@ while true; do case $yn in [Yy]* ) apt purge postfix -y; break;; [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 done @@ -232,7 +232,7 @@ while true; do case $yn in [Yy]* ) echo -e "${greenBold}Piler install started!! ${normal}"; break;; [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 done diff --git a/update.sh b/update.sh index c254381..2e6dfd8 100644 --- a/update.sh +++ b/update.sh @@ -50,38 +50,39 @@ 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 + if [[ -z $(which ${bin}) ]]; then echo "${redBold}Cannot find ${bin}, exiting...${normal}"; 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}" + echo -e "${purple}Found Docker Compose Plugin (native).${normal}" + echo -e "${purple}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}" + echo -e "${redBold}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}" + echo -e "${purple}Found Docker Compose Standalone.${normal}" + echo -e "${purple}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}" + echo -e "${redBold}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}" + echo -e "${redBold}Cannot find Docker Compose.${normal}" exit 1 fi @@ -92,7 +93,7 @@ while true; do case $yn in [Yy]* ) echo "${greenBold}********* Update started... Please wait... *********${normal}"; break;; [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 done From dcf14cfbed5b22f01ac865adf36cdff88e090313 Mon Sep 17 00:00:00 2001 From: simatec Date: Thu, 19 Jan 2023 09:44:17 +0100 Subject: [PATCH 07/13] (simatec) Beta v0.8.3 --- README.md | 3 ++ install-piler.sh | 35 ++++++++++--- piler.conf => piler.conf.example | 0 update.sh | 88 ++++++++++++++++++-------------- 4 files changed, 80 insertions(+), 46 deletions(-) rename piler.conf => piler.conf.example (100%) diff --git a/README.md b/README.md index 72c1aa8..e049ec6 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,9 @@ To leave the container on the console you have to execute 2x `exit`. ## Changelog +### 0.8.3 (19.01.2023) +* (simatec) Update himself added + ### 0.8.2 (18.01.2023) * (simatec) docker, curl and git Check added * (simatec) Update Config added diff --git a/install-piler.sh b/install-piler.sh index dbff82a..fb8e3d8 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -21,6 +21,7 @@ else fi HLINE="==================================================================" +HLINE_SMALL="===============================" BLA_metro=( 0.2 ' ' '= ' '== ' '=== ' ' ===' ' ==' ' =' ) @@ -88,16 +89,24 @@ fi ####################################################################################### # Path-Settings -installPth="/opt/piler-docker" -configPth="/opt/piler-docker/config" +installPth=`pwd` +configPth="$installPth/config" etcPth="/var/lib/docker/volumes/piler-docker_piler_etc/_data" -# Load config -. ./piler.conf - ############################## Installer Settings ###################################### if [ ! -f $installPth/.configDone ]; then + + # create config + if [ ! -f $installPth/piler.conf ]; then + if [ -f $installPth/piler.conf.example ]; then + cp $installPth/piler.conf.example $installPth/piler.conf + fi + fi + + # Load config + . ./piler.conf + # Piler-Domain read -ep "Please set your Piler-Domain (Enter for default: $PILER_DOMAIN): " pilerDomain pilerDomain=${pilerDomain:=$PILER_DOMAIN} @@ -201,6 +210,9 @@ if [ ! -f $installPth/.configDone ]; then touch $installPth/.configDone elif [ -f $installPth/.configDone ]; then + # Load config + . ./piler.conf + select name in Install-Piler Update-Piler do if [ $name = "Install-Piler" ]; then @@ -211,6 +223,15 @@ elif [ -f $installPth/.configDone ]; then echo echo "${blue}Ready for: $name${normal}" echo + + for fileUpdate in update.sh README.md; do + 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 + bash $installPth/update.sh && exit 1 fi done @@ -437,12 +458,12 @@ echo "${greenBold} Piler install 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}!" else 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 diff --git a/piler.conf b/piler.conf.example similarity index 100% rename from piler.conf rename to piler.conf.example diff --git a/update.sh b/update.sh index 2e6dfd8..ef363b4 100644 --- a/update.sh +++ b/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}" From 0f73949ecac107db0db1f7d00e9bd030e13e0fe6 Mon Sep 17 00:00:00 2001 From: simatec Date: Thu, 19 Jan 2023 09:54:54 +0100 Subject: [PATCH 08/13] (simatec) Fix Update --- install-piler.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-piler.sh b/install-piler.sh index fb8e3d8..46cc1ab 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -212,7 +212,7 @@ if [ ! -f $installPth/.configDone ]; then elif [ -f $installPth/.configDone ]; then # Load config . ./piler.conf - + select name in Install-Piler Update-Piler do if [ $name = "Install-Piler" ]; then @@ -227,7 +227,7 @@ elif [ -f $installPth/.configDone ]; then for fileUpdate in update.sh README.md; do echo "${purple}${HLINE}${HLINE_SMALL}" echo "${purple}****** Download Update $fileUpdate ******" - curl -o $installPth/$fileUpdate https://raw.githubusercontent.com/simatec/piler-docker/main/config/$fileUpdate + curl -o $installPth/$fileUpdate https://raw.githubusercontent.com/simatec/piler-docker/main/$fileUpdate echo "${purple}${HLINE}${HLINE_SMALL}${normal}" echo done From 54cfcded3383aa1d49b74c6e81eba0d51a72a061 Mon Sep 17 00:00:00 2001 From: simatec Date: Thu, 19 Jan 2023 10:10:52 +0100 Subject: [PATCH 09/13] (simatec) Beta v0.8v3 --- install-piler.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install-piler.sh b/install-piler.sh index 46cc1ab..e3eb6c7 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -51,6 +51,14 @@ BLA::stop_loading_animation() { ####################################################################################### +echo +echo "${greenBold}${HLINE_SMALL}" +echo "Welcome to Piler-Docker Installer" +echo "${greenBold}${HLINE_SMALL}${normal}" +echo + +####################################################################################### + # App Check for bin in curl docker git; do if [[ -z $(which ${bin}) ]]; then echo "${redBold}Cannot find ${bin}, exiting...${normal}"; exit 1; fi From 2a89f3c9f15f61b54f8b83f02d8c97a57b0138a3 Mon Sep 17 00:00:00 2001 From: simatec Date: Thu, 19 Jan 2023 10:18:52 +0100 Subject: [PATCH 10/13] (simatec) beta 0.8.3 --- install-piler.sh | 8 ++++---- update.sh | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/install-piler.sh b/install-piler.sh index e3eb6c7..d8aaa30 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -20,8 +20,8 @@ else normal=`echo -en "\e[0m"` fi -HLINE="==================================================================" -HLINE_SMALL="===============================" +HLINE="================================================================" +HLINE_SMALL="=================================" BLA_metro=( 0.2 ' ' '= ' '== ' '=== ' ' ===' ' ==' ' =' ) @@ -235,7 +235,7 @@ elif [ -f $installPth/.configDone ]; then for fileUpdate in update.sh README.md; do echo "${purple}${HLINE}${HLINE_SMALL}" echo "${purple}****** Download Update $fileUpdate ******" - curl -o $installPth/$fileUpdate https://raw.githubusercontent.com/simatec/piler-docker/main/$fileUpdate + curl -o -f $installPth/$fileUpdate https://raw.githubusercontent.com/simatec/piler-docker/main/$fileUpdate echo "${purple}${HLINE}${HLINE_SMALL}${normal}" echo done @@ -425,7 +425,7 @@ cat >> $etcPth/config-site.php <> $etcPth/config-site.php < Date: Thu, 19 Jan 2023 10:26:11 +0100 Subject: [PATCH 11/13] (simatec) Beta v0.8.3 --- install-piler.sh | 4 ++-- update.sh | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/install-piler.sh b/install-piler.sh index d8aaa30..83504a0 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -235,7 +235,7 @@ elif [ -f $installPth/.configDone ]; then for fileUpdate in update.sh README.md; do echo "${purple}${HLINE}${HLINE_SMALL}" echo "${purple}****** Download Update $fileUpdate ******" - curl -o -f $installPth/$fileUpdate https://raw.githubusercontent.com/simatec/piler-docker/main/$fileUpdate + curl -o $installPth/$fileUpdate https://raw.githubusercontent.com/simatec/piler-docker/main/$fileUpdate echo "${purple}${HLINE}${HLINE_SMALL}${normal}" echo done @@ -425,7 +425,7 @@ cat >> $etcPth/config-site.php < Date: Thu, 19 Jan 2023 14:46:14 +0100 Subject: [PATCH 12/13] (simatec) Fix volumes --- config/piler-ssl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/piler-ssl.yml b/config/piler-ssl.yml index 62d810f..010ab11 100644 --- a/config/piler-ssl.yml +++ b/config/piler-ssl.yml @@ -108,7 +108,7 @@ networks: name: nginx-proxy volumes: - b_data: + db_data: piler_etc: piler_var_store: piler_var_manticore: From bf583d530a2e7d332956f7e54c5cb62ba00d4bf7 Mon Sep 17 00:00:00 2001 From: simatec Date: Fri, 20 Jan 2023 09:20:32 +0100 Subject: [PATCH 13/13] (simatec) Fix DEFAULT_RETENTION_DAYS --- install-piler.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-piler.sh b/install-piler.sh index 83504a0..064c3d6 100644 --- a/install-piler.sh +++ b/install-piler.sh @@ -127,7 +127,7 @@ if [ ! -f $installPth/.configDone ]; then # retention Days read -ep "Please set retention days (Enter for default: $DEFAULT_RETENTION_DAYS Days): " retentionDays - retentionDays=${retentionDays:=$DEFAULT_RETENTION_DAYS Days} + retentionDays=${retentionDays:=$DEFAULT_RETENTION_DAYS} sed -i 's/DEFAULT_RETENTION_DAYS=.*/DEFAULT_RETENTION_DAYS="'$retentionDays'"/g' ./piler.conf # Smarthost