Line 19:
Line 19:
install-zarafa7.sh
install-zarafa7.sh
<syntaxhighlight lang="Bash">
<syntaxhighlight lang="Bash">
−
#
+
#!/bin/sh
+
#
+
# Zarafa on SME8
+
#
+
+
zarafainstall ()
+
{
+
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/indexer.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-indexer 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-indexer 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-indexer 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
</syntaxhighlight>
</syntaxhighlight>