1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-22 02:17:26 +00:00

properly set correct timezone

This commit is contained in:
jkaberg 2014-08-12 12:01:18 +02:00
parent 7ba79effae
commit e8a1837d02
2 changed files with 6 additions and 3 deletions

View File

@ -22,11 +22,12 @@ if [ ! -d /usr/local/lib/owncloud ]; then
fi fi
# Create a configuration file. # Create a configuration file.
TIMEZONE=`cat /etc/timezone`
if [ ! -f "/usr/local/lib/owncloud/config/config.php" ]; then if [ ! -f "/usr/local/lib/owncloud/config/config.php" ]; then
cat - > /usr/local/lib/owncloud/config/config.php <<EOF; cat - > /usr/local/lib/owncloud/config/config.php <<EOF;
<?php <?php
$CONFIG = array ( \$CONFIG = array (
'datadirectory' => '$STORAGE_ROOT/owncloud', 'datadirectory' => '$STORAGE_ROOT/owncloud',
array ( array (
0 => 0 =>
@ -43,7 +44,7 @@ $CONFIG = array (
), ),
'mail_smtpmode' => 'smtp', 'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'ssl', 'mail_smtpsecure' => 'ssl',
'mail_from_address' => 'no-reply@$PRIMARY_HOSTNAME', 'mail_from_address' => 'no-reply',
'mail_domain' => '$PRIMARY_HOSTNAME', 'mail_domain' => '$PRIMARY_HOSTNAME',
'mail_smtpauthtype' => 'LOGIN', 'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => true, 'mail_smtpauth' => true,
@ -51,6 +52,7 @@ $CONFIG = array (
'mail_smtpport' => '587', 'mail_smtpport' => '587',
'mail_smtpname' => 'no-reply@$PRIMARY_HOSTNAME', 'mail_smtpname' => 'no-reply@$PRIMARY_HOSTNAME',
'mail_smtppassword' => '$SECRET_PASSWORD', 'mail_smtppassword' => '$SECRET_PASSWORD',
'logtimezone' => '$TIMEZONE',
); );
?> ?>
EOF EOF

View File

@ -31,7 +31,8 @@ if [ ! -d /usr/local/lib/z-push ]; then
fi fi
# Configure default config # Configure default config
# TODO: Add timezone etc? TIMEZONE=`cat /etc/timezone`
sed -i "s/define('TIMEZONE', .*/define('TIMEZONE', '$TIMEZONE');/" /usr/local/lib/z-push/config.php
sed -i "s/define('BACKEND_PROVIDER', .*/define('BACKEND_PROVIDER', 'BackendCombined');/" /usr/local/lib/z-push/config.php sed -i "s/define('BACKEND_PROVIDER', .*/define('BACKEND_PROVIDER', 'BackendCombined');/" /usr/local/lib/z-push/config.php
# Configure BACKEND # Configure BACKEND