Scalix Update 11.x: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 20: | Zeile 20: | ||
scx-reconfigure.sh* | scx-reconfigure.sh* | ||
scx-update.sh* | scx-update.sh* | ||
</pre> | |||
Hier ist das Update-Script, das am Ende ein Script zur Rekonfiguration von Scalix aufruft, da die Konfig-Files beim Update überschrieben werden. | |||
<pre> | |||
#!/bin/sh | |||
# | |||
main_progs="server postgres tomcat-connector tomcat_" | |||
web_apps="swa sac mobile platform" | |||
scx_pkg () | |||
{ | |||
dpkg -I $1 | awk '/Package/ {print $2}' | |||
} | |||
reconfigure=`dirname $0`/scx-reconfigure.sh | |||
# get actual scalix pakage filenames | |||
# main_files, web_files, other_files | |||
for f in ${main_progs}; do | |||
main_files="${main_files} "`ls scalix-${f}*.deb` | |||
dropme="${dropme} | grep -v $f" | |||
done | |||
for f in ${web_apps}; do | |||
web_files="${web_files} "`ls scalix-${f}*.deb` | |||
dropme="${dropme} | grep -v $f" | |||
done | |||
other_files=`eval "ls -1 scalix-*.deb ${dropme}"` | |||
# Now Update the scalix pakages | |||
# The Web applications will be removed first | |||
if [ -n "${main_files}" ]; then | |||
echo "Updating Scalix Server" | |||
dpkg -i -E ${main_files} | |||
dpkg -i -E ${other_files} | |||
echo "" | |||
echo "Reinstalling Scalix Webapplications:" | |||
for file in ${web_files}; do | |||
pkg=`scx_pkg ${file}` | |||
echo "updating ${pkg}: ${file}" | |||
dpkg -r ${pkg} | |||
if ! dpkg -i ${file} ; then | |||
echo ">>> Warning: dpkg returned an error. <<<" | |||
echo "" | |||
fi | |||
done | |||
else | |||
echo 'Sorry, no scalix-\*.deb pakages found.' | |||
echo "Please change to the directory which contains the files and try again." | |||
exit 1 | |||
fi | |||
echo "We have to reconfigure the Scalix Configuration files." | |||
${reconfigure} | |||
echo "Scalix Config-files are reconfigured." | |||
</pre> | |||
Dieses Skript rekonfiguriert Scalix nach Änderungen: | |||
<pre> | |||
#!/bin/sh | |||
# | |||
echo "Scalix Password ? " | |||
read geheim | |||
dbpwd=$geheim | |||
ldappwd=$geheim | |||
tomcatport=80 | |||
ldomain=$(hostname -d) | |||
host=$(hostname) | |||
fqdn=$(hostname -f) | |||
short=${host:0:1}${host: -1:1} | |||
base=/var/opt/scalix/${short} | |||
files="$base/webmail/swa.properties \ | |||
$base/caa/scalix.res/config/ubermanager.properties \ | |||
$base/res/config/res.properties \ | |||
$base/platform/platform.properties \ | |||
$base/mobile/mobile.properties \ | |||
$base/sis/sis.properties" | |||
for file in $files; do | |||
sed -e "s;%LOCALDOMAIN%;$ldomain;g" \ | |||
-e "s;%LOCALHOST%;$fqdn;g" \ | |||
-e "s;%IMAPHOST%;$fqdn;g" \ | |||
-e "s;%SMTPHOST%;$fqdn;g" \ | |||
-e "s;%DBHOST%;$fqdn:5733;g" \ | |||
-e "s;%DBPASSWD%;$dbpwd;g" \ | |||
-e "s;%LDAPPORT%;389;g" \ | |||
-e "s;http://%PLATFORMURL%:8080/api;http://$fqdn/api;g" \ | |||
-e "s;%PLATFORMURL%;http://$fqdn/api;g" \ | |||
-e "s;swa.platform.enabled=false;swa.platform.enabled=true;g" \ | |||
-e "s;__SECURED_MODE__;false;g" \ | |||
-e "s;ubermanager/__FQHN_HOST__@__KERBEROS_REALM__;;g" \ | |||
-e "s;__KERBEROS_REALM__;;g" \ | |||
-e "s;__FQHN_FOR_KDC_HOST__;;g" \ | |||
-e "s;__FQHN_QUERY_SERVER_NAME__;$fqdn;g" \ | |||
-e "s;__UBERMGR_USE_EXTERNAL_AUTH__;false;g" \ | |||
-e "s;__UBERMGR_ALLOW_EXTERNAL_AUTH__;false;g" \ | |||
-e "s;__UBERMGR_MAXLIST_SIZE__;100;g" \ | |||
-e "s;__UBERMGR_MAIL_DOMAINS_LIST__;$ldomain;g" \ | |||
-e "s;__UBERMGR_EXTERNAL_DOMAIN_AUTH_LIST__;;g" \ | |||
-e "s;__CONFIGURED__;true;g" \ | |||
-e "s;__FQHN_FOR_UBERMANAGER__;$fqdn;g" \ | |||
-e "s;__TOMCAT_PORT__;$tomcatport;g" \ | |||
-e "s;localhost;$fqdn;g" \ | |||
-e "s;%SIS-LANGUAGE%;German;g" \ | |||
-e "s;%INDEX-WHITELIST%;$fqdn;g" \ | |||
-e "s;%SEARCH-WHITELIST%;$fqdn;g" \ | |||
$file > $file.neu | |||
mv $file.neu $file | |||
done | |||
# If SAC Login doesn't work, try this | |||
# Write Ldappassword to psdata | |||
if [ ! -e ${base}/caa/scalix.res/config/psdata ]; then | |||
echo "$ldappwd" > ${base}/caa/scalix.res/config/psdata | |||
chown root:root ${base}/caa/scalix.res/config/psdata | |||
chmod 400 ${base}/caa/scalix.res/config/psdata | |||
fi | |||
for f in /etc/rc1.d/K*scalix*; do $f stop; done | |||
for f in /etc/rc2.d/S*scalix*; do $f start; done | |||
</pre> | </pre> | ||
Version vom 19. Juli 2008, 10:04 Uhr
Scalix Update
Scalix Sourcen laden und updaten.
scx:~# cd /usr/src wget -c http://downloads.scalix.com/.community/..../scalix-11.x.0-GA-debian-intel.tgz tar xvzf scalix-11.x.0-GA-debian-intel.tgz cd scalix-debian-11.4.0-GA/software/scalix_server ../../../scx-update.sh
Das Update-Script habe ich unter /usr/src liegen, da ich dort auch die verschiedenen scalix-sourcen installiert habe:
scx:/usr/src# ls scalix-11.3.0-U1-GA-unsupported-debian-intel.bin scalix-11.4.0-GA-unsupported-debian-intel.bin scalix-debian-11.3.0-GA/ scalix-debian-11.4.0-GA/ scx-install.sh* scx-reconfigure.sh* scx-update.sh*
Hier ist das Update-Script, das am Ende ein Script zur Rekonfiguration von Scalix aufruft, da die Konfig-Files beim Update überschrieben werden.
#!/bin/sh
#
main_progs="server postgres tomcat-connector tomcat_"
web_apps="swa sac mobile platform"
scx_pkg ()
{
dpkg -I $1 | awk '/Package/ {print $2}'
}
reconfigure=`dirname $0`/scx-reconfigure.sh
# get actual scalix pakage filenames
# main_files, web_files, other_files
for f in ${main_progs}; do
main_files="${main_files} "`ls scalix-${f}*.deb`
dropme="${dropme} | grep -v $f"
done
for f in ${web_apps}; do
web_files="${web_files} "`ls scalix-${f}*.deb`
dropme="${dropme} | grep -v $f"
done
other_files=`eval "ls -1 scalix-*.deb ${dropme}"`
# Now Update the scalix pakages
# The Web applications will be removed first
if [ -n "${main_files}" ]; then
echo "Updating Scalix Server"
dpkg -i -E ${main_files}
dpkg -i -E ${other_files}
echo ""
echo "Reinstalling Scalix Webapplications:"
for file in ${web_files}; do
pkg=`scx_pkg ${file}`
echo "updating ${pkg}: ${file}"
dpkg -r ${pkg}
if ! dpkg -i ${file} ; then
echo ">>> Warning: dpkg returned an error. <<<"
echo ""
fi
done
else
echo 'Sorry, no scalix-\*.deb pakages found.'
echo "Please change to the directory which contains the files and try again."
exit 1
fi
echo "We have to reconfigure the Scalix Configuration files."
${reconfigure}
echo "Scalix Config-files are reconfigured."
Dieses Skript rekonfiguriert Scalix nach Änderungen:
#!/bin/sh
#
echo "Scalix Password ? "
read geheim
dbpwd=$geheim
ldappwd=$geheim
tomcatport=80
ldomain=$(hostname -d)
host=$(hostname)
fqdn=$(hostname -f)
short=${host:0:1}${host: -1:1}
base=/var/opt/scalix/${short}
files="$base/webmail/swa.properties \
$base/caa/scalix.res/config/ubermanager.properties \
$base/res/config/res.properties \
$base/platform/platform.properties \
$base/mobile/mobile.properties \
$base/sis/sis.properties"
for file in $files; do
sed -e "s;%LOCALDOMAIN%;$ldomain;g" \
-e "s;%LOCALHOST%;$fqdn;g" \
-e "s;%IMAPHOST%;$fqdn;g" \
-e "s;%SMTPHOST%;$fqdn;g" \
-e "s;%DBHOST%;$fqdn:5733;g" \
-e "s;%DBPASSWD%;$dbpwd;g" \
-e "s;%LDAPPORT%;389;g" \
-e "s;http://%PLATFORMURL%:8080/api;http://$fqdn/api;g" \
-e "s;%PLATFORMURL%;http://$fqdn/api;g" \
-e "s;swa.platform.enabled=false;swa.platform.enabled=true;g" \
-e "s;__SECURED_MODE__;false;g" \
-e "s;ubermanager/__FQHN_HOST__@__KERBEROS_REALM__;;g" \
-e "s;__KERBEROS_REALM__;;g" \
-e "s;__FQHN_FOR_KDC_HOST__;;g" \
-e "s;__FQHN_QUERY_SERVER_NAME__;$fqdn;g" \
-e "s;__UBERMGR_USE_EXTERNAL_AUTH__;false;g" \
-e "s;__UBERMGR_ALLOW_EXTERNAL_AUTH__;false;g" \
-e "s;__UBERMGR_MAXLIST_SIZE__;100;g" \
-e "s;__UBERMGR_MAIL_DOMAINS_LIST__;$ldomain;g" \
-e "s;__UBERMGR_EXTERNAL_DOMAIN_AUTH_LIST__;;g" \
-e "s;__CONFIGURED__;true;g" \
-e "s;__FQHN_FOR_UBERMANAGER__;$fqdn;g" \
-e "s;__TOMCAT_PORT__;$tomcatport;g" \
-e "s;localhost;$fqdn;g" \
-e "s;%SIS-LANGUAGE%;German;g" \
-e "s;%INDEX-WHITELIST%;$fqdn;g" \
-e "s;%SEARCH-WHITELIST%;$fqdn;g" \
$file > $file.neu
mv $file.neu $file
done
# If SAC Login doesn't work, try this
# Write Ldappassword to psdata
if [ ! -e ${base}/caa/scalix.res/config/psdata ]; then
echo "$ldappwd" > ${base}/caa/scalix.res/config/psdata
chown root:root ${base}/caa/scalix.res/config/psdata
chmod 400 ${base}/caa/scalix.res/config/psdata
fi
for f in /etc/rc1.d/K*scalix*; do $f stop; done
for f in /etc/rc2.d/S*scalix*; do $f start; done