(simatec) Beta v0.9.0
This commit is contained in:
parent
9f46e3ac29
commit
68ebb3ba23
2 changed files with 31 additions and 46 deletions
|
@ -277,7 +277,9 @@ fi
|
||||||
|
|
||||||
# Build Piler
|
# Build Piler
|
||||||
cd $buildPth
|
cd $buildPth
|
||||||
bash build.sh
|
echo echo "${greenBold}Start Piler-Build...${normal}" && \
|
||||||
|
bash build.sh && \
|
||||||
|
echo "${greenBold}Piler-Build finish${normal}"
|
||||||
|
|
||||||
if [ -f $installPth/docker-compose.yml ]; then
|
if [ -f $installPth/docker-compose.yml ]; then
|
||||||
rm $installPth/docker-compose.yml
|
rm $installPth/docker-compose.yml
|
||||||
|
|
73
update.sh
73
update.sh
|
@ -170,12 +170,13 @@ 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 $etcPth/config-site.php.bak $installPth/backup/ && cp $etcPth/config-site.php $installPth/backup/
|
||||||
cp $etcPth/piler.conf.bak $installPth/backup/ && cp $etcPth/piler.conf $installPth/backup/
|
#cp $etcPth/piler.conf.bak $installPth/backup/ && cp $etcPth/piler.conf $installPth/backup/
|
||||||
cp $etcPth/.my.cnf $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
|
||||||
|
|
||||||
# Added Manticore
|
# Added Manticore
|
||||||
if [ ! -f $etcPth/MANTICORE ]; then
|
if [ ! -f $etcPth/MANTICORE ]; then
|
||||||
|
@ -184,7 +185,9 @@ fi
|
||||||
|
|
||||||
# Build Piler
|
# Build Piler
|
||||||
cd $buildPth
|
cd $buildPth
|
||||||
bash build.sh
|
echo echo "${greenBold}Start Piler-Build...${normal}" && \
|
||||||
|
bash build.sh && \
|
||||||
|
echo "${greenBold}Piler-Build finish${normal}"
|
||||||
|
|
||||||
# Copy docker-compose.yml
|
# Copy docker-compose.yml
|
||||||
if [ "$USE_LETSENCRYPT" = "yes" ]; then
|
if [ "$USE_LETSENCRYPT" = "yes" ]; then
|
||||||
|
@ -218,52 +221,32 @@ else
|
||||||
docker-compose up --force-recreate --build -d
|
docker-compose up --force-recreate --build -d
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "${blue}********* Piler started... Please wait... *********${normal}"
|
#echo "${blue}********* Piler started... Please wait... *********${normal}"
|
||||||
|
|
||||||
BLA::start_loading_animation "${BLA_metro[@]}"
|
#BLA::start_loading_animation "${BLA_metro[@]}"
|
||||||
sleep 20
|
#sleep 20
|
||||||
BLA::stop_loading_animation
|
#BLA::stop_loading_animation
|
||||||
|
|
||||||
# Restore Config
|
# Restore Config
|
||||||
cp $installPth/backup/config-site.php.bak $etcPth/ && cp $installPth/backup/config-site.php $etcPth/
|
#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/piler.conf.bak $etcPth/ && cp $installPth/backup/piler.conf $etcPth/
|
||||||
cp $installPth/backup/.my.cnf $etcPth/
|
#cp $installPth/backup/.my.cnf $etcPth/
|
||||||
|
#cp $installPth/backup/* $etcPth/
|
||||||
if [ "$USE_MAILCOW" = true ]; then
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "${blue}${HLINE}"
|
|
||||||
echo "set Mailcow Api-Key config"
|
|
||||||
echo "${blue}${HLINE}${normal}"
|
|
||||||
echo
|
|
||||||
|
|
||||||
cat >> $etcPth/config-site.php <<EOF
|
|
||||||
|
|
||||||
// Mailcow API
|
|
||||||
\$config['MAILCOW_API_KEY'] = '$MAILCOW_APIKEY';
|
|
||||||
\$config['MAILCOW_SET_REALNAME'] = true;
|
|
||||||
\$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';
|
|
||||||
\$config['MAILCOW_HOST'] = '$MAILCOW_HOST'; // default $config['IMAP_HOST']
|
|
||||||
include('auth-mailcow.php');
|
|
||||||
EOF
|
|
||||||
|
|
||||||
curl -o $etcPth/auth-mailcow.php https://raw.githubusercontent.com/patschi/mailpiler-mailcow-integration/master/auth-mailcow.php
|
|
||||||
fi
|
|
||||||
|
|
||||||
# piler restart
|
# piler restart
|
||||||
echo
|
#echo
|
||||||
echo "${blue}${HLINE}"
|
#echo "${blue}${HLINE}"
|
||||||
echo "${blue} restart piler ..."
|
#echo "${blue} restart piler ..."
|
||||||
echo "${blue}${HLINE}${normal}"
|
#echo "${blue}${HLINE}${normal}"
|
||||||
echo
|
#echo
|
||||||
|
|
||||||
cd $installPth
|
#cd $installPth
|
||||||
|
|
||||||
if [ $COMPOSE_VERSION = native ]; then
|
#if [ $COMPOSE_VERSION = native ]; then
|
||||||
docker compose restart piler
|
# docker compose restart piler
|
||||||
else
|
#else
|
||||||
docker-compose restart piler
|
# docker-compose restart piler
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "${greenBold}${HLINE}"
|
echo "${greenBold}${HLINE}"
|
||||||
|
@ -288,4 +271,4 @@ echo "${blue}You can remove the old unused containers on your system!"
|
||||||
echo "${blue}Execute the following command: docker system prune"
|
echo "${blue}Execute the following command: docker system prune"
|
||||||
echo "${blue}${HLINE}${normal}"
|
echo "${blue}${HLINE}${normal}"
|
||||||
echo
|
echo
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue