Generate webmail configuration
This commit is contained in:
parent
b067a9b2f6
commit
36b2c46b0c
|
@ -8868,7 +8868,9 @@ function install_webmail {
|
|||
repair_databases_script
|
||||
|
||||
apt-get -y install php5-common php5-cli php5-curl php5-gd php5-mysql php5-mcrypt git
|
||||
apt-get -y install php5-dev imagemagick php5-imagick
|
||||
apt-get -y install php5-dev imagemagick php5-imagick php5-sqlite php-auth-sasl php-net-smtp php-mime-type
|
||||
apt-get -y install php-mail-mime php-mail-mimedecode php-net-ldap3
|
||||
pear install Net_IDNA2
|
||||
|
||||
if [ ! -f $WEBMAIL_PATH/index.php ]; then
|
||||
cd $WEB_PATH
|
||||
|
@ -8880,7 +8882,6 @@ function install_webmail {
|
|||
else
|
||||
sed -i "s/Webmail commit.*/Webmail commit:$WEBMAIL_COMMIT/g" $COMPLETION_FILE
|
||||
fi
|
||||
chown -R www-data:www-data $WEBMAIL_PATH
|
||||
fi
|
||||
if [ ! -f $WEBMAIL_PATH/index.php ]; then
|
||||
echo $'Did not clone webmail repo'
|
||||
|
@ -8905,6 +8906,21 @@ function install_webmail {
|
|||
fi
|
||||
ln -s $WEBMAIL_PATH /var/www/$DEFAULT_DOMAIN_NAME/htdocs/webmail
|
||||
|
||||
if [ ! -f /var/www/webmail/config/config.inc.php ]; then
|
||||
# generate the configuration
|
||||
echo '<?php' > /var/www/webmail/config/config.inc.php
|
||||
echo "\$config['db_dsnw'] = 'mysql://webmailadmin:${WEBMAIL_ADMIN_PASSWORD}@localhost/webmail';" >> /var/www/webmail/config/config.inc.php
|
||||
echo "\$config['default_host'] = 'localhost';" >> /var/www/webmail/config/config.inc.php
|
||||
echo "\$config['support_url'] = '';" >> /var/www/webmail/config/config.inc.php
|
||||
WEBMAIL_DES_KEY="$(openssl rand -base64 32 | cut -c1-25)"
|
||||
echo "\$config['des_key'] = '${WEBMAIL_DES_KEY}';" >> /var/www/webmail/config/config.inc.php
|
||||
echo "\$config['product_name'] = '${PROJECT_NAME}';" >> /var/www/webmail/config/config.inc.php
|
||||
echo "$config['plugins'] = array('enigma');" >> /var/www/webmail/config/config.inc.php
|
||||
echo "$config['mime_param_folding'] = 0;" >> /var/www/webmail/config/config.inc.php
|
||||
fi
|
||||
|
||||
chown -R www-data:www-data $WEBMAIL_PATH
|
||||
|
||||
if ! grep -q "Webmail" /home/$MY_USERNAME/README; then
|
||||
echo '' >> /home/$MY_USERNAME/README
|
||||
echo '' >> /home/$MY_USERNAME/README
|
||||
|
|
Loading…
Reference in New Issue