Line 1: |
Line 1: |
| + | * The first if-statement below from the "Creating SME-QMAIL-user-templates" section from the 'Zarafa Install Script' does not correctly handle the situation where <tt>GlobalForward</tt> is <tt>enabled</tt> but an account has the <tt>zarafa</tt> property set to <tt>disabled</tt> ... |
| + | <syntaxhighlight lang="Bash"> |
| + | { |
| + | my \$zarafa = \$user->prop('zarafa') || 'disabled'; |
| + | my \$zarafa2 = \${'zarafa-server'}{GlobalForward} || 'disabled'; |
| + | |
| + | if (\$zarafa eq 'enabled' || \$zarafa2 eq 'enabled') |
| + | { return "| /usr/bin/zarafa-dagent -q \$USERNAME ; if [ \\$\\? -ne 0 ] ; then exit -1; else exit 99; fi;" |
| + | } |
| + | } |
| + | </syntaxhighlight> |
| + | Maybe this could work: |
| + | <syntaxhighlight lang="Bash"> |
| + | { |
| + | my \$zarafa = \$user->prop('zarafa') || ' '; |
| + | my \$zarafa2 = \${'zarafa-server'}{GlobalForward} || 'disabled'; |
| + | |
| + | if ((\$zarafa ne 'disabled' && \$zarafa2 eq 'enabled') || (\$zarafa eq 'enabled' && \$zarafa2 eq 'disabled')) |
| + | { return "| /usr/bin/zarafa-dagent -q \$USERNAME ; if [ \\$\\? -ne 0 ] ; then exit -1; else exit 99; fi;" |
| + | } |
| + | } |
| + | </syntaxhighlight> |
| + | |
| + | |
| *On 64-bit systems there are a few symbolic links and path not correct after installation | | *On 64-bit systems there are a few symbolic links and path not correct after installation |
| | | |
Line 14: |
Line 38: |
| both link to /lib but should be /lib64 | | both link to /lib but should be /lib64 |
| | | |
− | = Installing 7.1.x (work in progress !/not tested yet !)= | + | = Installing 7.1.x (works for me. Please test in your environment) = |
− | This script takes the example-config-files of ZCP to make a SME-template from it (cf 'replace'-actions refering to SME-db) | + | This script takes the example-config-files of ZCP to make a SME-template from it (cf 'replace'-actions refering to SME-db)<br> |
| 7.1.x needs a few changes in server.cfg and a new search.cfg-template to replace the indexer.cfg-template : [http://doc.zarafa.com/7.1/Administrator_Manual/en-US/html-single/index.html#_700to710] | | 7.1.x needs a few changes in server.cfg and a new search.cfg-template to replace the indexer.cfg-template : [http://doc.zarafa.com/7.1/Administrator_Manual/en-US/html-single/index.html#_700to710] |
| | | |
− | ==== INSTALLSCRIPT ==== | + | ==== INSTALLSCRIPT (7.1.x) ==== |
| ===== nano -w /etc/e-smith/events/actions/zarafa-install ===== | | ===== nano -w /etc/e-smith/events/actions/zarafa-install ===== |
| | | |
Line 1,053: |
Line 1,077: |
| yes | | yes |
| <ENTER> | | <ENTER> |
− |
| |
| | | |
| ==== UPGRADESCRIPT ==== | | ==== UPGRADESCRIPT ==== |
| | | |
− | ===== Uninstall zarafa-indexer and remove templates, db-entries and links for zarafa-indexer ===== | + | ===== Only if you are upgrading from zcp 7.0.x to 7.1.x -> Uninstall zarafa-indexer and remove templates, db-entries and links for zarafa-indexer : ===== |
− | Only if you are upgrading from zcp 7.0.x :
| |
| | | |
| rpm -e zarafa-indexer --nodeps | | rpm -e zarafa-indexer --nodeps |
| rm -rf /etc/e-smith/templates/etc/zarafa/indexer.cfg | | rm -rf /etc/e-smith/templates/etc/zarafa/indexer.cfg |
− | db configuration delprop zarafa-indexer | + | db configuration delete zarafa-indexer |
| rm -f /etc/rc.d/rc7.d/S99zarafa-indexer | | rm -f /etc/rc.d/rc7.d/S99zarafa-indexer |
| + | |
| + | ===== Only if you are upgrading from zcp 7.0.x to 7.1.x -> Delete the old update-script for zcp 7.0.x : ===== |
| + | |
| + | rm -f /etc/e-smith/events/actions/zarafa-update |
| | | |
| ===== nano -w /etc/e-smith/events/actions/zarafa-update ===== | | ===== nano -w /etc/e-smith/events/actions/zarafa-update ===== |
Line 1,386: |
Line 1,412: |
| yes | | yes |
| <ENTER> | | <ENTER> |
| + | |
| + | ===== Execute zarafa-update ===== |
| + | |
| + | cd /etc/e-smith/events/actions/ |
| + | |
| + | ./zarafa-update |
| + | |
| + | ===== Only if you are upgrading from zcp 7.0.x to 7.1.x -> nano -w /etc/e-smith/events/actions/zarafa-update-to71 : ===== |
| + | <nowiki> |
| + | #!/usr/bin/env bash |
| + | clear |
| + | |
| + | /bin/echo "Stopping the Zarafa-services" |
| + | /etc/e-smith/events/actions/zarafa-services stop |
| + | |
| + | if [ `whoami` != "root" ]; then |
| + | echo "This installation must be run as user root." |
| + | echo "Become root, and run this script again." |
| + | echo |
| + | exit 1 |
| + | fi |
| + | |
| + | ########################################## |
| + | # Creating some Zarafa-actions |
| + | ########################################## |
| + | |
| + | # |
| + | #--- zarafa-expand-templates --- |
| + | # |
| + | echo |
| + | echo "Creating zarafa-expand-templates-action ..." |
| + | echo |
| + | cat <<HERE1 > /etc/e-smith/events/actions/zarafa-expand-templates |
| + | #!/bin/sh |
| + | /sbin/e-smith/expand-template /etc/zarafa/gateway.cfg |
| + | /sbin/e-smith/expand-template /etc/zarafa/ical.cfg |
| + | /sbin/e-smith/expand-template /etc/zarafa/server.cfg |
| + | /sbin/e-smith/expand-template /etc/zarafa/unix.cfg |
| + | /sbin/e-smith/expand-template /etc/zarafa/monitor.cfg |
| + | /sbin/e-smith/expand-template /etc/zarafa/search.cfg |
| + | /sbin/e-smith/expand-template /etc/zarafa/spooler.cfg |
| + | /sbin/e-smith/expand-template /etc/zarafa/dagent.cfg |
| + | /sbin/e-smith/expand-template /etc/zarafa/licensed.cfg |
| + | /etc/e-smith/events/actions/qmail-update-user |
| + | HERE1 |
| + | |
| + | |
| + | # |
| + | #--- zarafa-services --- |
| + | # |
| + | echo |
| + | echo "Creating zarafa-services-action ..." |
| + | echo |
| + | cat <<HERE2 > /etc/e-smith/events/actions/zarafa-services |
| + | #!/bin/sh |
| + | FILE=/etc/rc.d/init.d/zarafa-licensed |
| + | if [ "\$1" == start ]; then |
| + | /etc/rc.d/init.d/zarafa-dagent start |
| + | /etc/rc.d/init.d/zarafa-gateway start |
| + | /etc/rc.d/init.d/zarafa-ical start |
| + | if [ -a \$FILE ]; then \$FILE start; fi |
| + | /etc/rc.d/init.d/zarafa-monitor start |
| + | /etc/rc.d/init.d/zarafa-spooler start |
| + | /etc/rc.d/init.d/zarafa-search start |
| + | /etc/rc.d/init.d/zarafa-server start |
| + | exit 0 |
| + | fi |
| + | if [ "\$1" == stop ]; then |
| + | /etc/rc.d/init.d/zarafa-dagent stop |
| + | /etc/rc.d/init.d/zarafa-gateway stop |
| + | /etc/rc.d/init.d/zarafa-ical stop |
| + | if [ -a \$FILE ]; then \$FILE stop; fi |
| + | /etc/rc.d/init.d/zarafa-search stop |
| + | /etc/rc.d/init.d/zarafa-spooler stop |
| + | /etc/rc.d/init.d/zarafa-server stop |
| + | /etc/rc.d/init.d/zarafa-monitor stop |
| + | exit 0 |
| + | fi |
| + | if [ "\$1" == restart ]; then |
| + | /etc/rc.d/init.d/zarafa-dagent stop |
| + | /etc/rc.d/init.d/zarafa-gateway stop |
| + | /etc/rc.d/init.d/zarafa-ical stop |
| + | if [ -a \$FILE ]; then \$FILE stop; fi |
| + | /etc/rc.d/init.d/zarafa-monitor stop |
| + | /etc/rc.d/init.d/zarafa-search stop |
| + | /etc/rc.d/init.d/zarafa-spooler stop |
| + | /etc/rc.d/init.d/zarafa-server stop |
| + | /etc/rc.d/init.d/zarafa-dagent start |
| + | /etc/rc.d/init.d/zarafa-gateway start |
| + | /etc/rc.d/init.d/zarafa-ical start |
| + | if [ -a \$FILE ]; then \$FILE start; fi |
| + | /etc/rc.d/init.d/zarafa-monitor start |
| + | /etc/rc.d/init.d/zarafa-server start |
| + | /etc/rc.d/init.d/zarafa-spooler start |
| + | /etc/rc.d/init.d/zarafa-search start |
| + | exit 0 |
| + | fi |
| + | if [ "\$1" == enabled ]; then |
| + | config setprop zarafa-gateway status enabled |
| + | config setprop zarafa-ical status enabled |
| + | if [ -a \$FILE ]; then config setprop zarafa-licensed status enabled; fi |
| + | config setprop zarafa-monitor status enabled |
| + | config setprop zarafa-server status enabled |
| + | config setprop zarafa-spooler status enabled |
| + | config setprop zarafa-search status enabled |
| + | config setprop zarafa-dagent status enabled |
| + | exit 0 |
| + | fi |
| + | if [ "\$1" == disabled ]; then |
| + | config setprop zarafa-gateway status disabled |
| + | config setprop zarafa-ical status disabled |
| + | if [ -a \$FILE ]; then config setprop zarafa-licensed status disabled; fi |
| + | config setprop zarafa-monitor status disabled |
| + | config setprop zarafa-server status disabled |
| + | config setprop zarafa-spooler status disabled |
| + | config setprop zarafa-search status disabled |
| + | config setprop zarafa-dagent status disabled |
| + | exit 0 |
| + | fi |
| + | echo "Usage: start|stop|restart|enabled|disabled" |
| + | exit 0 |
| + | HERE2 |
| + | |
| + | /bin/chmod 554 /etc/e-smith/events/actions/zarafa-expand-templates |
| + | /bin/chmod 554 /etc/e-smith/events/actions/zarafa-services |
| + | |
| + | ###################################### |
| + | # Setting up SME-db-entries |
| + | ###################################### |
| + | |
| + | /sbin/e-smith/db configuration set zarafa-search service status enabled |
| + | |
| + | ###################################### |
| + | # Setting up more symbolic links |
| + | ###################################### |
| + | |
| + | /bin/echo |
| + | /bin/echo "Setting up more symbolic links" |
| + | /bin/echo |
| + | |
| + | ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S99zarafa-search |
| + | |
| + | /bin/echo "Expanding Zarafa-templates" |
| + | /etc/e-smith/events/actions/zarafa-expand-templates |
| + | |
| + | /bin/echo "Expanding http.conf-template" |
| + | /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
| + | |
| + | /bin/echo "Restarting httpd" |
| + | /usr/bin/sv restart /service/httpd-e-smith |
| + | |
| + | /bin/echo "Starting Zarafa-services" |
| + | /etc/e-smith/events/actions/zarafa-services start |
| + | </nowiki> |
| + | |
| + | ===== To save : ===== |
| + | <nowiki> |
| + | |
| + | CTRL + X |
| + | yes |
| + | <ENTER> |
| + | </nowiki> |
| + | |
| + | ===== Execute zarafa-update-to71 ===== |
| + | |
| + | /bin/chmod 554 /etc/e-smith/events/actions/zarafa-update-to71 |
| + | |
| + | cd /etc/e-smith/events/actions/ |
| + | |
| + | ./zarafa-update-to71 |
| + | |
| + | signal-event post-upgrade; signal-event reboot |