(simatec) Beta 0.8.0
This commit is contained in:
parent
de83ced596
commit
5a554c7ae5
1 changed files with 91 additions and 86 deletions
|
@ -60,45 +60,46 @@ etcPth="/var/lib/docker/volumes/piler-docker_piler_etc/_data"
|
||||||
|
|
||||||
############################## Installer Settings #######################################
|
############################## Installer Settings #######################################
|
||||||
|
|
||||||
|
if [ ! -f $installPth/.configDone ]; then
|
||||||
# Piler-Domain
|
# Piler-Domain
|
||||||
read -ep "Please set your Piler-Domain (Enter for default: piler.example.com): " pilerDomain
|
read -ep "Please set your Piler-Domain (Enter for default: $PILER_DOMAIN): " pilerDomain
|
||||||
pilerDomain=${pilerDomain:=piler.example.com}
|
pilerDomain=${pilerDomain:=$PILER_DOMAIN}
|
||||||
sed -i 's/PILER_DOMAIN=.*/PILER_DOMAIN="'$pilerDomain'"/g' ./piler.conf
|
sed -i 's/PILER_DOMAIN=.*/PILER_DOMAIN="'$pilerDomain'"/g' ./piler.conf
|
||||||
|
|
||||||
# Piler-Admin-Mail
|
# Piler-Admin-Mail
|
||||||
read -ep "Please set your Mailserver Admin Mail (Enter for default: admin@example.com): " pilerAdminMail
|
read -ep "Please set your Mailserver Admin Mail (Enter for default: $SUPPORT_MAIL): " pilerAdminMail
|
||||||
pilerAdminMail=${pilerAdminMail:=admin@example.com}
|
pilerAdminMail=${pilerAdminMail:=$SUPPORT_MAIL}
|
||||||
sed -i 's/SUPPORT_MAIL=.*/SUPPORT_MAIL="'$pilerAdminMail'"/g' ./piler.conf
|
sed -i 's/SUPPORT_MAIL=.*/SUPPORT_MAIL="'$pilerAdminMail'"/g' ./piler.conf
|
||||||
|
|
||||||
# retention Days
|
# retention Days
|
||||||
read -ep "Please set retention days (Enter for default: 2555 Days ~ 7 Years): " retentionDays
|
read -ep "Please set retention days (Enter for default: $DEFAULT_RETENTION_DAYS Days): " retentionDays
|
||||||
retentionDays=${retentionDays:=2555}
|
retentionDays=${retentionDays:=$DEFAULT_RETENTION_DAYS Days}
|
||||||
sed -i 's/DEFAULT_RETENTION_DAYS=.*/DEFAULT_RETENTION_DAYS="'$retentionDays'"/g' ./piler.conf
|
sed -i 's/DEFAULT_RETENTION_DAYS=.*/DEFAULT_RETENTION_DAYS="'$retentionDays'"/g' ./piler.conf
|
||||||
|
|
||||||
# Smarthost
|
# Smarthost
|
||||||
read -ep "Please set your Smarthost (Enter for default: 127.0.0.1). Default settings can be used here!!: " pilerSmartHost
|
read -ep "Please set your Smarthost (Enter for default: $SMARTHOST). Default settings can be used here!!: " pilerSmartHost
|
||||||
pilerSmartHost=${pilerSmartHost:=127.0.0.1}
|
pilerSmartHost=${pilerSmartHost:=$SMARTHOST}
|
||||||
sed -i 's/SMARTHOST=.*/SMARTHOST="'$pilerSmartHost'"/g' ./piler.conf
|
sed -i 's/SMARTHOST=.*/SMARTHOST="'$pilerSmartHost'"/g' ./piler.conf
|
||||||
|
|
||||||
# IMAP Server
|
# IMAP Server
|
||||||
read -ep "Please set your IMAP Server (Enter for default: imap.example.com): " imapServer
|
read -ep "Please set your IMAP Server (Enter for default: $IMAP_SERVER): " imapServer
|
||||||
imapServer=${imapServer:=imap.example.com}
|
imapServer=${imapServer:=$IMAP_SERVER}
|
||||||
sed -i 's/IMAP_SERVER=.*/IMAP_SERVER="'$imapServer'"/g' ./piler.conf
|
sed -i 's/IMAP_SERVER=.*/IMAP_SERVER="'$imapServer'"/g' ./piler.conf
|
||||||
|
|
||||||
# Timezone
|
# Timezone
|
||||||
read -ep "Please set your Timezone (Enter for default: Europe/Berlin): " timeZone
|
read -ep "Please set your Timezone (Enter for default: $TIME_ZONE): " timeZone
|
||||||
timeZone=${timeZone:=Europe/Berlin}
|
timeZone=${timeZone:=$TIME_ZONE}
|
||||||
timeZone="${timeZone////\\/}"
|
timeZone="${timeZone////\\/}"
|
||||||
sed -i 's/TIME_ZONE=.*/TIME_ZONE="'$timeZone'"/g' ./piler.conf
|
sed -i 's/TIME_ZONE=.*/TIME_ZONE="'$timeZone'"/g' ./piler.conf
|
||||||
|
|
||||||
# MySql Database
|
# MySql Database
|
||||||
read -ep "Please set your MySql Database (Enter for default: piler): " pilerDataBase
|
read -ep "Please set your MySql Database (Enter for default: $MYSQL_DATABASE): " pilerDataBase
|
||||||
pilerDataBase=${pilerDataBase:=piler}
|
pilerDataBase=${pilerDataBase:=$MYSQL_DATABASE}
|
||||||
sed -i 's/MYSQL_DATABASE=.*/MYSQL_DATABASE="'$pilerDataBase'"/g' ./piler.conf
|
sed -i 's/MYSQL_DATABASE=.*/MYSQL_DATABASE="'$pilerDataBase'"/g' ./piler.conf
|
||||||
|
|
||||||
# MySql User
|
# MySql User
|
||||||
read -ep "Please set your MySql User (Enter for default: piler): " pilerUser
|
read -ep "Please set your MySql User (Enter for default: $MYSQL_USER): " pilerUser
|
||||||
pilerUser=${pilerUser:=piler}
|
pilerUser=${pilerUser:=$MYSQL_USER}
|
||||||
sed -i 's/MYSQL_USER=.*/MYSQL_USER="'$pilerUser'"/g' ./piler.conf
|
sed -i 's/MYSQL_USER=.*/MYSQL_USER="'$pilerUser'"/g' ./piler.conf
|
||||||
|
|
||||||
# MySql Password
|
# MySql Password
|
||||||
|
@ -122,8 +123,8 @@ done
|
||||||
|
|
||||||
# Let's Encrypt registration contact information
|
# Let's Encrypt registration contact information
|
||||||
if [ "$USE_LETSENCRYPT" = "yes" ]; then
|
if [ "$USE_LETSENCRYPT" = "yes" ]; then
|
||||||
read -ep "Please set Let's Encrypt registration contact information (Enter for default: admin@example.com): " acmeContact
|
read -ep "Please set Let's Encrypt registration contact information (Enter for default: $LETSENCRYPT_EMAIL): " acmeContact
|
||||||
acmeContact=${acmeContact:=admin@example.com}
|
acmeContact=${acmeContact:=$LETSENCRYPT_EMAIL}
|
||||||
sed -i 's/LETSENCRYPT_EMAIL=.*/LETSENCRYPT_EMAIL="'$acmeContact'"/g' ./piler.conf
|
sed -i 's/LETSENCRYPT_EMAIL=.*/LETSENCRYPT_EMAIL="'$acmeContact'"/g' ./piler.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -142,8 +143,8 @@ done
|
||||||
|
|
||||||
if [ "$USE_MAILCOW" = true ]; then
|
if [ "$USE_MAILCOW" = true ]; then
|
||||||
# Mailcow API-Key
|
# Mailcow API-Key
|
||||||
read -ep "Please set your Mailcow API-Key: " apiKey
|
read -ep "Please set your Mailcow API-Key (current: $MAILCOW_APIKEY): " apiKey
|
||||||
apiKey=$apiKey
|
apiKey=${apiKey:=$MAILCOW_APIKEY}
|
||||||
sed -i 's/MAILCOW_APIKEY=.*/MAILCOW_APIKEY="'$apiKey'"/g' ./piler.conf
|
sed -i 's/MAILCOW_APIKEY=.*/MAILCOW_APIKEY="'$apiKey'"/g' ./piler.conf
|
||||||
|
|
||||||
# Mailcow Host Domain
|
# Mailcow Host Domain
|
||||||
|
@ -159,6 +160,10 @@ echo "and can be adjusted there at any time."
|
||||||
echo "${blue}${HLINE}${normal}"
|
echo "${blue}${HLINE}${normal}"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
# config done
|
||||||
|
touch $installPth/.configDone
|
||||||
|
fi
|
||||||
|
|
||||||
# uninstall Postfix
|
# uninstall Postfix
|
||||||
while true; do
|
while true; do
|
||||||
read -ep "Postfix must be uninstalled prior to installation. Do you want to uninstall Postfix now? (y/n): " yn
|
read -ep "Postfix must be uninstalled prior to installation. Do you want to uninstall Postfix now? (y/n): " yn
|
||||||
|
|
Loading…
Reference in a new issue