You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
roundcube/entrypoint.sh

30 lines
1.5 KiB

set -e;
cp config/config.inc.php /tmp/config.inc.php
## Configure
## DATABASE
[ -n $RC_DB_TYPE ] && sed -i "s:dbtype=.*:dbtype='$RC_DB_TYPE';:" /tmp/config.inc.php
[ -n $RC_DB_HOST ] && sed -i "s:dbserver=.*:dbserver='$RC_DB_HOST';:" /tmp/config.inc.php
[ -n $RC_DB_USER ] && sed -i "s:dbuser=.*:dbuser='$RC_DB_USER';:" /tmp/config.inc.php
[ -n $RC_DB_NAME ] && sed -i "s:dbname=.*:dbname='$RC_DB_NAME';:" /tmp/config.inc.php
[ -n $RC_DB_PASSWORD ] && sed -i "s:dbpass=.*:dbpass='$RC_DB_PASSWORD';:" /tmp/config.inc.php
## IMAP
[ -n $RC_DEFAULT_HOST ] && sed -i "s#imaphost=.*#imaphost='$RC_DEFAULT_HOST';#" /tmp/config.inc.php
[ -n $RC_DEFAULT_PORT ] && sed -i "s:imapport=.*:imapport='$RC_DEFAULT_PORT';:" /tmp/config.inc.php
## SMTP
[ -n $RC_SMTP_SERVER ] && sed -i "s#smtphost=.*#smtphost='$RC_SMTP_SERVER';#" /tmp/config.inc.php
[ -n $RC_SMTP_PORT ] && sed -i "s:smtpport=.*:smtpport='$RC_SMTP_PORT';:" /tmp/config.inc.php
## OPTIONS
[ -n $RC_SUPPORT_URL ] && sed -i "s#rcsupporturl=.*#rcsupporturl='$RC_SUPPORT_URL';#" /tmp/config.inc.php
[ -n $RC_PRODUCT_NAME ] && sed -i "s#rcproductname=.*#rcproductname='$RC_PRODUCT_NAME';#" /tmp/config.inc.php
[ -n $RC_MAIL_DOMAIN ] && sed -i "s#rcmaildomain=.*#rcmaildomain='$RC_MAIL_DOMAIN';#" /tmp/config.inc.php
[ -n $RC_SKIN ] && sed -i "s:rcskin=.*:rcskin='$RC_SKIN';:" /tmp/config.inc.php
cp /tmp/config.inc.php config/config.inc.php
## INSTALL INITAL TABLES
#mysql -h $RC_DB_HOST -u $RC_DB_USER -p$RC_DB_PASSWORD $RC_DB_NAME < SQL/mysql.initial.sql; exit
exec $@