Line 1,012:
Line 1,012:
fi
fi
fi
fi
+
+
#######################################
+
# Z-Push
+
#######################################
+
+
#
+
#--- /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29ZarafaAliases ---
+
#
+
echo
+
echo "Creating /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29ZarafaAliases ..."
+
echo
+
cat <<HERE1 > /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29ZarafaAliases
+
{
+
# vim: ft=perl:
+
+
\$haveSSL = (exists \${modSSL}{status} and \${modSSL}{status} eq "enabled") ? 'yes' : 'no';
+
my \$zwebmailStatus = \$zarafa{'status'} || "disabled";
+
my \$zwebmailAccessType = \$zarafa{'access'} || "SSL";
+
+
my \$dirs;
+
\$dirs{zarafa} = '/usr/share/zarafa-webaccess';
+
\$dirs{webaccess} = '/usr/share/zarafa-webaccess';
+
\$dirs{webmail} = '/usr/share/zarafa-webaccess';
+
if (\$imp{'status'} eq 'enabled') {\$dirs{webmail} = ''};
+
\$dirs{webapp} = '/usr/share/zarafa-webapp';
+
\$dirs{'Microsoft-Server-ActiveSync'} = '/usr/share/z-push/index.php';
+
+
return " # Zarafa is disabled in this VirtualHost\n"
+
unless \$zwebmailStatus eq 'enabled';
+
+
foreach \$place ('zarafa','webmail','webaccess','webapp','Microsoft-Server-ActiveSync')
+
{
+
if ((\$port eq "80") && (\$haveSSL eq 'yes') && (\$zwebmailAccessType eq 'SSL'))
+
{
+
\$OUT .= " RewriteRule ^/\$place(/.*|\\$) https://%{HTTP_HOST}/\$place\\\$1 [L,R]\n";
+
} else {
+
if ((\$dirs{\$place}) ne '') {\$OUT .= " Alias /\$place \$dirs{\$place}\n"};
+
}
+
}
+
}
+
HERE1
+
+
#
+
#--- /etc/e-smith/templates/etc/httpd/conf/httpd.conf/86ZarafaAlias ---
+
#
+
echo
+
echo "Creating /etc/e-smith/templates/etc/httpd/conf/httpd.conf/86ZarafaAlias ..."
+
echo
+
cat <<HERE2 > /etc/e-smith/templates/etc/httpd/conf/httpd.conf/86ZarafaAlias
+
{
+
my \$zstatus = \$zarafa{'status'};
+
+
if (defined \$zstatus && \$zstatus eq 'enabled')
+
{
+
\$OUT .= qq(
+
#--------------------------------------------------------------------
+
# Zarafa specific configuration files.
+
#--------------------------------------------------------------------
+
+
Alias /zarafa /usr/share/zarafa-webaccess/
+
<Directory /usr/share/zarafa-webaccess/>
+
Options -Indexes
+
AllowOverride All
+
order allow,deny
+
allow from all
+
AddType application/x-httpd-php .php
+
php_flag magic_quotes_gpc off
+
php_flag track_vars on
+
</Directory>
+
+
Alias /webapp /usr/share/zarafa-webapp/
+
<Directory /usr/share/zarafa-webapp/>
+
Options -Indexes
+
AllowOverride All
+
order allow,deny
+
allow from all
+
AddType application/x-httpd-php .php
+
php_flag magic_quotes_gpc off
+
php_flag track_vars on
+
</Directory>
+
+
<Directory /usr/share/z-push/>
+
Options -Indexes
+
AllowOverride All
+
order allow,deny
+
allow from all
+
AddType application/x-httpd-php .php .php3
+
php_flag magic_quotes_gpc off
+
php_flag register_globals off
+
php_flag magic_quotes_runtime off
+
php_flag short_open_tag on
+
</Directory>
+
+
);
+
}
+
else
+
{
+
\$OUT .= "# Zarafa Webmail is not configured as it is disabled in the config db";
+
}
+
}
+
HERE2
+
+
######################################
+
# Configuration of Z-push
+
######################################
+
+
/bin/echo
+
/bin/echo "Configuration of Z-push"
+
/bin/echo
+
FILE=/var/lib/z-push; if [ -d $FILE ]; then /bin/echo -e "** $FILE already exists, skipping **\n"; else /bin/mkdir $FILE; fi
+
FILE=/var/lib/z-push; if [ -d $FILE ]; then /bin/chown -R www:www $FILE; fi
+
FILE=/var/lib/z-push; if [ -d $FILE ]; then /bin/chmod 755 $FILE; fi
+
FILE=/var/log/z-push; if [ -d $FILE ]; then /bin/echo -e "** $FILE already exists, skipping **\n"; else /bin/mkdir $FILE; fi
+
FILE=/var/log/z-push; if [ -d $FILE ]; then /bin/chown -R www:www $FILE; fi
+
FILE=/var/log/z-push; if [ -d $FILE ]; then /bin/chmod 755 $FILE; fi
+
+
/bin/echo
+
/bin/echo "Expanding http.conf-template"
+
/bin/echo
+
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
+
+
/bin/echo
+
/bin/echo "Restarting httpd"
+
/bin/echo
+
/usr/bin/sv restart /service/httpd-e-smith
Line 1,092:
Line 1,217:
signal-event yum-modify
signal-event yum-modify
−
VERSION=7.0.15-4279
+
ZVERSION=7.0.15-4279
+
PUSHVERSION=2.1.1-1788
if [ `$(cat /etc/redhat-release|grep -o 8)` = "8"); then
if [ `$(cat /etc/redhat-release|grep -o 8)` = "8"); then
RHV=5
RHV=5
Line 1,105:
Line 1,231:
mkdir -p /root/install/zarafa
mkdir -p /root/install/zarafa
cd /root/install/zarafa
cd /root/install/zarafa
−
wget http://download.zarafa.com/community/final/7.0/$VERSION/zcp-$VERSION-rhel-$RHV-$CPUARCH-free.tar.gz
+
wget http://zarafa-deutschland.de/z-push-download/final/2.1/z-push-$PUSHVERSION.tar.gz
+
wget http://download.zarafa.com/community/final/7.0/$ZVERSION/zcp-$ZVERSION-rhel-$RHV-$CPUARCH-free.tar.gz
tar -zxvf zcp-*
tar -zxvf zcp-*
−
cd zcp-$VERSION-rhel-$RHV-$CPUARCH
+
cd zcp-$ZVERSION-rhel-$RHV-$CPUARCH
rm -f *-dev*.rpm
rm -f *-dev*.rpm
yum -y localinstall *.rpm
yum -y localinstall *.rpm
Line 1,113:
Line 1,240:
yum -y install php53-mapi --enablerepo=epel,epel-testing
yum -y install php53-mapi --enablerepo=epel,epel-testing
zarafainstall
zarafainstall
+
yum -y install php-posix; sv t httpd-e-smith
+
tar zxvf /root/install/zarafa/z-push-$PUSHVERSION.tar.gz -C /usr/share
+
mv /usr/share/z-push-$PUSHVERSION /usr/share/z-push
+
config setprop zarafa-server GlobalForward enabled
config setprop zarafa-server GlobalForward enabled
/etc/e-smith/events/actions/qmail-update-user
/etc/e-smith/events/actions/qmail-update-user