(simatec) v0.9.0

This commit is contained in:
simatec 2023-01-23 15:11:22 +01:00
parent 68ebb3ba23
commit eb50915835
3 changed files with 29 additions and 34 deletions

View file

@ -144,8 +144,11 @@ To leave the container on the console you have to execute 2x `exit`.
********************************************************************************************************** **********************************************************************************************************
## Changelog ## Changelog
### 0.9.0 (19.01.2023)
* (simatec) Betatest Piler Build ### 0.9.0 (23.01.2023)
* (simatec) Piler Build added
* (simatec) Piler Import Option added
* (simatec) Fix Updater
### 0.8.3 (19.01.2023) ### 0.8.3 (19.01.2023)
* (simatec) Update himself added * (simatec) Update himself added

View file

@ -100,6 +100,7 @@ fi
installPth=`pwd` installPth=`pwd`
configPth="$installPth/config" configPth="$installPth/config"
etcPth="/var/lib/docker/volumes/piler-docker_piler_etc/_data" etcPth="/var/lib/docker/volumes/piler-docker_piler_etc/_data"
cronPth="/var/lib/docker/volumes/piler-docker_piler_cron/_data"
buildPth="$installPth/build" buildPth="$installPth/build"
############################## Installer Settings ###################################### ############################## Installer Settings ######################################
@ -208,6 +209,16 @@ if [ ! -f $installPth/.configDone ]; then
sed -i 's/MAILCOW_HOST=.*/MAILCOW_HOST="'$mailcowHost'"/g' ./piler.conf sed -i 's/MAILCOW_HOST=.*/MAILCOW_HOST="'$mailcowHost'"/g' ./piler.conf
fi fi
# Import Interval Settings
while true; do
read -ep "If Use automatic import to 5 minutes interval (yes/no)? / Y|N (Default: no): " jn
case $jn in
[Yy]* ) AUTO_IMPORT=true; break;;
[Nn]* ) AUTO_IMPORT=false; break;;
* ) echo -e "${redBold} Please confirm with Y or N.${normal}";;
esac
done
echo echo
echo "${blue}${HLINE}" echo "${blue}${HLINE}"
echo "All settings were saved in the piler.conf file" echo "All settings were saved in the piler.conf file"
@ -355,6 +366,7 @@ echo
cat >> $etcPth/config-site.php <<EOF cat >> $etcPth/config-site.php <<EOF
// ### Begin added by Piler-Installer ###
// Smarthost // Smarthost
\$config['SMARTHOST'] = '$SMARTHOST'; \$config['SMARTHOST'] = '$SMARTHOST';
\$config['SMARTHOST_PORT'] = '25'; \$config['SMARTHOST_PORT'] = '25';
@ -412,8 +424,16 @@ cat >> $etcPth/config-site.php <<EOF
// special settings. // special settings.
//\$config['MEMCACHED_ENABLED'] = 1; //\$config['MEMCACHED_ENABLED'] = 1;
\$config['SPHINX_STRICT_SCHEMA'] = 1; // required for Sphinx see https://bitbucket.org/jsuto/piler/issues/1085/sphinx-331. \$config['SPHINX_STRICT_SCHEMA'] = 1; // required for Sphinx see https://bitbucket.org/jsuto/piler/issues/1085/sphinx-331.
// ### end added by Piler-Installer ###
EOF EOF
if [ "$AUTO_IMPORT" = true ]; then
cat >> $cronPth/piler <<EOF
### Piler import added by Piler-Installer
*/5 * * * * /usr/libexec/piler/import.sh
EOF
fi
if [ "$USE_MAILCOW" = true ]; then if [ "$USE_MAILCOW" = true ]; then
echo echo
@ -424,12 +444,14 @@ echo
cat >> $etcPth/config-site.php <<EOF cat >> $etcPth/config-site.php <<EOF
// ### Begin added by Piler-Installer ###
// Mailcow API // Mailcow API
\$config['MAILCOW_API_KEY'] = '$MAILCOW_APIKEY'; \$config['MAILCOW_API_KEY'] = '$MAILCOW_APIKEY';
\$config['MAILCOW_SET_REALNAME'] = true; \$config['MAILCOW_SET_REALNAME'] = true;
\$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access'; \$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';
\$config['MAILCOW_HOST'] = '$MAILCOW_HOST'; // default $config['IMAP_HOST'] \$config['MAILCOW_HOST'] = '$MAILCOW_HOST'; // default $config['IMAP_HOST']
include('auth-mailcow.php'); include('auth-mailcow.php');
// ### end added by Piler-Installer ###
EOF EOF
curl -o $etcPth/auth-mailcow.php https://raw.githubusercontent.com/patschi/mailpiler-mailcow-integration/master/auth-mailcow.php curl -o $etcPth/auth-mailcow.php https://raw.githubusercontent.com/patschi/mailpiler-mailcow-integration/master/auth-mailcow.php

View file

@ -170,10 +170,7 @@ if [ ! -d $installPth/backup ]; then
mkdir -p $installPth/backup mkdir -p $installPth/backup
fi fi
#cp $etcPth/config-site.php.bak $installPth/backup/ && cp $etcPth/config-site.php $installPth/backup/ cp -rf $etcPth/* $installPth/backup/
#cp $etcPth/piler.conf.bak $installPth/backup/ && cp $etcPth/piler.conf $installPth/backup/
#cp $etcPth/.my.cnf $installPth/backup/
cp $etcPth/* $installPth/backup/
# delete old files # delete old files
#rm -f $etcPth/piler.key $etcPth/piler.pem $etcPth/config-site.php #rm -f $etcPth/piler.key $etcPth/piler.pem $etcPth/config-site.php
@ -185,7 +182,7 @@ fi
# Build Piler # Build Piler
cd $buildPth cd $buildPth
echo echo "${greenBold}Start Piler-Build...${normal}" && \ echo "${greenBold}Start Piler-Build...${normal}" && \
bash build.sh && \ bash build.sh && \
echo "${greenBold}Piler-Build finish${normal}" echo "${greenBold}Piler-Build finish${normal}"
@ -221,33 +218,6 @@ else
docker-compose up --force-recreate --build -d docker-compose up --force-recreate --build -d
fi fi
#echo "${blue}********* Piler started... Please wait... *********${normal}"
#BLA::start_loading_animation "${BLA_metro[@]}"
#sleep 20
#BLA::stop_loading_animation
# Restore Config
#cp $installPth/backup/config-site.php.bak $etcPth/ && cp $installPth/backup/config-site.php $etcPth/
#cp $installPth/backup/piler.conf.bak $etcPth/ && cp $installPth/backup/piler.conf $etcPth/
#cp $installPth/backup/.my.cnf $etcPth/
#cp $installPth/backup/* $etcPth/
# piler restart
#echo
#echo "${blue}${HLINE}"
#echo "${blue} restart piler ..."
#echo "${blue}${HLINE}${normal}"
#echo
#cd $installPth
#if [ $COMPOSE_VERSION = native ]; then
# docker compose restart piler
#else
# docker-compose restart piler
#fi
echo echo
echo "${greenBold}${HLINE}" echo "${greenBold}${HLINE}"
echo "${greenBold} Piler Update completed successfully" echo "${greenBold} Piler Update completed successfully"