Changes

Jump to navigation Jump to search
3,460 bytes added ,  19:56, 8 April 2014
m
Line 1,394: Line 1,394:     
===== nano -w /etc/e-smith/events/actions/zarafa-update-to71 =====
 
===== nano -w /etc/e-smith/events/actions/zarafa-update-to71 =====
 +
 +
#!/usr/bin/env bash
 +
clear
 +
 +
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
199

edits

Navigation menu