NOTE: Please be warned, that a SME 6.01 Server with the Plus script cannot be smoothly updated to SME 7 without removing the updates from the Plus script!

Removal instructions before updating to SME 7

Removal script

Greg Swallow has made a removal script at HomePage.html/SME6.0.1Contribs-RemovalScript

If you have installed only some contribs or are using an older version of the script, then you might have to modify it. Please report all problems only to this bug report on Sourceforge (you will need to create an account using a valid email account so you can provide feedback)

https://sourceforge.net/tracker/index.php?func=detail&aid=1303356&group_id=96750&atid=615772

Why remove them? Why are they not compatible?

Some contribs (upgrades rather) like php and mysql, are of higher or different versions than SME7, and don't upgrade cleanly. Other contribs, like antivirus, securemail, and spamassassin are features that are included in SME7, so those need to be removed. Other contribs that deal with email are not compatible because some of the underlying programs have changed in SME7. Contribs that use the apache server are also usually incompatible as the template fragments need to be changed for SME7 which uses a newer version of Apache - see this forum thread for one major example of this - http://forums.contribs.org/viewtopic.php?t=27793 - and a suggestion on how to make some contribs compatible with SME6 or 7.

Should I do this now? Or wait until SME7 is final?

I wouldn't recommend upgrading a production server now, as SME7 is still not released. And there's no need to remove the incompatible contribs until you want to upgrade. There are now official maintenance updates to SME6. The removal script installs the yum update utility for you, that is used to keep up to date with the latest updates. For more information see this page: HomePage.html/How%20to%20update%20SME%20Server




Installation Tips and Instructions


If you have found a dead link please feel free to update it (Edit button at the bottom of this page).
If you would like to add a contrib that you think others would find useful and that you have tested thouroughly yourself - also please do so!

For more information about this script see the forum posts here:
Version 1: http://forums.contribs.org/viewtopic.php?t=24202
Version 2: http://forums.contribs.org/viewtopic.php?t=24285
Version 3 (current): http://forums.contribs.org/viewtopic.php?t=24972

For comments/problems/questions about the individual contribs please look for help
from the author of that particular contrib, perhaps by posting in the forums in that
specific topic. This is a compilation of many contribs from many sources.

Here is a list of the contribs contained in this script, with links to their support pages or contributor's website. At one point in the script you will be asked if you want to install the 'optional' contribs. They are optional, but please install them as you will probably find them very useful.

PHP: RPMS provided by: http://mirror.contribs.org/smeserver/contribs/ldinclaux/SME6.x/Contribs/RPMS/
...now maintained in main script
OpenSSH: http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/OpenSSH/
OpenSSL: http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/OpenSSL/
Webmail: http://no.longer.valid/modules/mylinks/singlelink.php?cid=117&lid=416
...but updated files found at: http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/WebMail/
Apache (also db4 and python 2.3): This is really not an SME contrib, but just Redhat 7.3 compatible RPMS
http://norlug.org/?op=rpms&rpm_func=rpm_index&cat=1
MySQL 4.0: Many contributors to this - not sure who was first
http://forums.contribs.org/viewtopic.php?t=23920
...now maintained in main script
Misc. Security Updates http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/
Lazy Admin Tools: http://mirror.contribs.org/smeserver/contribs/mblotwijk/HowToGuides/lazy-admin-tools.htm
Userpanel: http://www.dungog.net/sme/files/userpanel/
Antivirus: http://sme.swerts-knudsen.com/howtos/howto_22.htm
Spam Filter: http://sme.swerts-knudsen.com/howtos/howto_29.htm
Phpmyadmin: http://mirror.contribs.org/smeserver/contribs/nightspirit/e-smith-phpmyadmin/
Awstats: http://sme.swerts-knudsen.com/howtos/howto_7.htm
Securemail: http://www.pagefault.org/howto/securemail.shtml
Modindex: http://mirror.contribs.org/smeserver/contribs/gzartman/Beta/ModIndex/
Delete Double Bounce emails: http://sme.swerts-knudsen.com/howtos/howto_27.htm
Fetchmail POP 3: http://www.schirrms.net/sme/SMEFetchMail.php
Dungog contribs: http://www.dungog.net/sme/files/index.php
Windows Update Cache Manager: http://perso.wanadoo.fr/passionelectro/
DHCP to DNS Synchroniser: http://www.activeservice.co.uk/sme/contribs/
DHCP Manager: http://www.developit.fr/FichePratique/SMEServer/
Print Spooler Manager: http://www.saco-support.de/sme/smeserver-lprng-monitor/
Mail Log Analyser: http://www.saco-support.de/sme/saco-mitel-isoqlog/saco-mitel-isoqlog-0.1-09.noarch.rpm
Rootkit Hunter: http://mirror.contribs.org/smeserver/contribs/dthomas/smeserver/6.x/Contrib/rkhunter/
Raidmonitor: http://mirror.contribs.org/smeserver/contribs/dmay/smeserver/5.x/contrib/raidmonitor/
Twig: Twig is not supported anymore on SME 6.01 by the author (see http://www.myezserver.com)


Revision Information

If you want to see previous versions of this document look here:



Change log


Known Problems

Some problems you might run into if you are upgrading an already modified server. Maybe we can integrate detecting for some contribs that are already installed that might conflict/stop working after the update script is run.



smeplus.sh

#!/bin/sh

while [ "$start" != "y" ] ; do

case "$start" in
 "d" | "D")
    lang="de"
    #clear screen
    clear
    echo '/=====================================================================\'
    echo '| Dieses Script laedt Updates fuer den SME 6.01 Server in /root/plus/,|'
    echo '| installiert diese, wenn alle erfolgreich heruntergeladen wurden und |'
    echo '| installiert optional einige zusaetzliche Contribs.                  |'
    echo '|                                                                     |'
    echo '| Dies ist *kein* offizielles Script von Contribs.org und nur fuer    |'
    echo '| neue Installationen von SME 6.0.1-01 gedacht, er kann jedoch auch   |'
    echo '| bei bereits geaenderten SME 6.01 Installationen funktionieren.      |'
    echo '|                                                                     |'
    echo '| Es wird keinerlei Garantie fuer Fehlerfreiheit oder Funktionalitaet |'
    echo '| der Updates gewaehrt. Der Einsatz erfolgt auf Ihr eigenes Risiko.   |'
    echo '|                                                                     |'
    echo '| Wenn Sie zustimmen und starten moechten, druecken Sie "y" und Enter,|'
    echo '| ansonsten "n" und Enter, um den Script abzubrechen.                 |'
    echo '|                                                                     |'
    echo '| Sie koennen optional die Ausgabe mitprotokollieren, indem Sie vor   |'
    echo '| dem Aufruf des Scriptes "script smeplus.log" eingeben und die       |'
    echo '| Ausgabe nach Ende des Scriptes mit "exit" wieder stoppen.           |'
    echo '|                                                                     |'
    echo '| Geben Sie "e" fuer englische Infos ein, "f" fuer franzoesische.     |'
    echo '\=====================================================================/'
 ;;

"f" | "F")
    lang="fr"
    #clear screen
    clear
    echo '/=====================================================================\'
    echo '| Ce script va télécharger des mises à jour pour votre SME 6.01 dans  |'
    echo '|  /root/plus/, installez-les et venez y ajouter quelques contribs.   |'
    echo '|                                                                     |'
    echo '| Ce script est une mise à jour *non* officielle et n`est prévue que  |'
    echo '| pour des nouvelles installations de SME 6.0.1-01 mais *peut*        |'
    echo '| fonctionner avec des installations SME 6.01 déjà modifiées.         |'
    echo '|                                                                     |'
    echo '| Aucune garantie n`est fournie et vous utilisez ce script à vos      |'
    echo '| propres risques.                                                    |'
    echo '|                                                                     |'
    echo '| Si vous acceptez ce qui est dit ci-dessus appuyez sur "y" pour      |'
    echo '| continuer sinon appuyez sur "n" ou "Enter" pour arrêter ce script.  |'
    echo '|                                                                     |'
    echo '| Si vous le souhaitez vous pouvez enregistrer les messages du script:|'
    echo '| Avant d`entrer "sh smeplus.sh" tapez "script smeplus.log" ...       |'
    echo '| A la fin de l`exécution de ce script tapez "exit"                   |'
    echo '|                                                                     |'
    echo '| press "d" for german informations, and "e" for english informations.|'
    echo '\=====================================================================/'
 ;;
 *)
    lang="us"
    #clear screen
    clear
    echo '/=====================================================================\'
    echo '| This script will download updates for your SME 6.01 in /root/plus/, |'
    echo '| installs them after successful download and add some contribs.      |'
    echo '|                                                                     |'
    echo '| This script is *no* official update and intended only for fresh     |'
    echo '| installations of SME 6.0.1-01 but *may* work with modified          |'
    echo '| SME 6.01 installations, too.                                        |'
    echo '|                                                                     |'
    echo '| No express or implied warranties are provided and its usage is at   |'
    echo '| your own risk.                                                      |'
    echo '|                                                                     |'
    echo '| If you agree with the above then press "y" and Enter, if not press  |'
    echo '| "n" and Enter to abort the script.                                  |'
    echo '|                                                                     |'
    echo '| If you like you can log the output of this script for review later: |'
    echo '| Before typing "sh smeplus.sh" type "script smeplus.log" ...         |'
    echo '| and after the script is complete type "exit"                        |'
    echo '|                                                                     |'
    echo '| press "d" for german informations, and "f" for french informations. |'
    echo '\=====================================================================/'
 ;;
 esac

 read start

 if [ "$start" = "n" ] ; then
    exit 1
 fi
done

#make download directory
mkdir -p /root/plus
cd /root/plus

echo -n "Checking SME version..."
rpm -qa > rpmlist

# logfile is created with tee statement below

IS_SME601=`cat rpmlist | grep -c e-smith-release-6.0.1-01`
if [ $IS_SME601 -eq 1 ] ; then
echo "Installing on SME 6.0.1-01..."
else
echo "This update only supports SME 6.0.1-01 at the moment - Exiting..."
exit 1
fi

echo -n "Checking online status..."

host www.contribs.org |grep 'address'|cut -b30- > ip.txt
if [ -e `cat ip.txt` ]; then
clear
echo "exiting. no connection to www.contribs.org ... "
rm ip.txt
exit 1
else
clear
echo "connection to www.contribs.org is ok and has address "
cat ip.txt
rm ip.txt
fi

echo ""

while [ "$contribs" != "y" -a "$contribs" != "n" ] ; do

case "$lang" in
 "us") echo "Do you want to install additional contribs? [y/n]" ;;
 "de") echo "Moechten Sie zusaetzliche Contribs installieren? [y/n]" ;;
 "fr") echo "Voulez-vous installer des Contribs supplémentaires? [y/n]" ;;
esac

echo "(SpamFilter, AntiVirus, Lazy Admin Tools, PHPmyadmin, etc.)"
read contribs
done


###########
#downloads#
###########

#download status bar
echo " "
echo "Downloading files...Please be patient, 100MB? of downloads"
echo "[------------------------]"
echo -n "["

#updates

#download php updates
#moved contents of php script into main script so we can benefit from download error checking
mkdir -p /root/plus/phpupgrade
cd /root/plus/phpupgrade
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-4.3.10-3eo.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-devel-4.3.10-3eo.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-imap-4.3.10-3eo.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-ldap-4.3.10-3eo.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-mysql-4.3.10-3eo.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-odbc-4.3.10-3eo.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/ergozd/scripts/phprpms/php-snmp-4.3.10-3eo.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://download.fedoralegacy.org/redhat/7.3/os/i386/unixODBC-2.2.0-5.i386.rpm -a /root/plus/plus.log
echo -n "."

#download openssh
mkdir -p /root/plus/openssh
cd /root/plus/openssh
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/OpenSSH/openssh-3.9p1-1es1.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/OpenSSH/openssh-clients-3.9p1-1es1.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/OpenSSH/openssh-server-3.9p1-1es1.i386.rpm -a /root/plus/plus.log
echo -n "."

#download openssl
mkdir -p /root/plus/openssl
cd /root/plus/openssl
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/OpenSSL/openssl-0.9.6m-1es1.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/OpenSSL/openssl-devel-0.9.6m-1es1.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/OpenSSL/openssl-perl-0.9.6m-1es1.i386.rpm -a /root/plus/plus.log
echo -n "."

#download webmail
mkdir -p /root/plus/webmail
cd /root/plus/webmail
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/WebMail/e-smith-imp-1.10.0-04dm.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/WebMail/e-smith-kronolith-0.8.1-02.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/WebMail/e-smith-mnemo-0.8.0-04.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/WebMail/e-smith-nag-0.8.0-05.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/WebMail/horde-2.2.5-1dm.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/WebMail/imp-3.2.5-01dm.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/WebMail/kronolith-1.1.2-1es.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/WebMail/mnemo-1.1.2-1es.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/WebMail/nag-1.1.1-1es.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/WebMail/turba-1.2.2-1es00.noarch.rpm -a /root/plus/plus.log
echo -n "."


#download apache and dependancies
mkdir -p /root/plus/apache
cd /root/plus/apache
wget -nc -nd -S 'http://mirror.datapipe.net/norlug/redhat-7.3/RPMS/db4-4.0.14-4.norlug.i386.rpm' -a /root/plus/plus.log
wget -nc -nd -S 'http://mirror.datapipe.net/norlug/redhat-7.3/RPMS/python2.3-2.3.5-1.norlug.i386.rpm' -a /root/plus/plus.log
wget -nc -nd -S 'http://mirror.datapipe.net/norlug/redhat-7.3/RPMS/mod_ssl-2.8.28-1.norlug.i386.rpm' -a /root/plus/plus.log
wget -nc -nd -S 'http://mirror.datapipe.net/norlug/redhat-7.3/RPMS/apache-1.3.37-1.norlug.i386.rpm' -a /root/plus/plus.log
wget -nc -nd -S 'http://mirror.datapipe.net/norlug/redhat-7.3/RPMS/apache-devel-1.3.37-1.norlug.i386.rpm' -a /root/plus/plus.log
wget -nc -nd -S 'http://mirror.datapipe.net/norlug/redhat-7.3/RPMS/apache-manual-1.3.37-1.norlug.i386.rpm' -a /root/plus/plus.log
wget -nc -nd -S 'http://download.fedoralegacy.org/redhat/7.3/os/i386/compat-glibc-6.2-2.1.3.2.i386.rpm' -a /root/plus/plus.log
echo -n "."

#download mysql updates
#moved script from contribs.org/contribs/ergozd into main script to benefit from download error checking
mkdir -p /root/plus/MySQL_Upgrade
cd /root/plus/MySQL_Upgrade
wget -nc -nd -S http://downloads.mysql.com/archives/mysql-4.0/MySQL-shared-compat-4.0.22-0.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://downloads.mysql.com/archives/mysql-4.0/MySQL-server-4.0.22-0.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://downloads.mysql.com/archives/mysql-4.0/MySQL-client-4.0.22-0.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://downloads.mysql.com/archives/mysql-4.0/MySQL-devel-4.0.22-0.i386.rpm -a /root/plus/plus.log
echo -n "."

#download misc. updates
mkdir -p /root/plus/updates
cd /root/plus/updates
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/zlib-1.2.1.1-4.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/zlib-devel-1.2.1.1-4.i386.rpm  -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/proftpd-1.2.10-es1.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/fetchmail-6.2.5-1.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/Rsync/rsync-2.6.2-1.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Updates/6.0.1/GnuPG/gnupg-1.2.4-0_19.rh7.3.at.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://mirror.contribs.org/smeserver/releases/6.0.1/updates-common/i386/initscripts-6.67-1es26.i386.rpm -a /root/plus/plus.log
echo -n "."

# optional contribs

if [ "$contribs" = "y" ]; then

#download lazy admin tools and userpanel
mkdir -p /root/plus/lat-userpanel
cd /root/plus/lat-userpanel
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/e-smith-lazy_admin_tools-0.9.0-1.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Userpanel/e-smith-userpanel-1.6.0-3.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Userpanel/perl-Unicode-IMAPUtf7-1.02-1.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/Userpanel/perl-Unicode-String-2.06-1.i386.rpm -a /root/plus/plus.log
echo -n "."

#download Antivirus script
cd /root/plus
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/AntiVirus/antivirus_install.sh -a /root/plus/plus.log
echo -n "."

#download Spamfilter script
cd /root/plus
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/SpamFilter/spamfilter_install.sh -a /root/plus/plus.log
echo -n "."

#download phpmyadmin
mkdir -p /root/plus/phpmyadmin
cd /root/plus/phpmyadmin
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/nightspirit/e-smith-phpmyadmin/e-smith-phpmyadmin-2.6.0-12.noarch.rpm -a /root/plus/plus.log
cd /root/plus
echo -n "."

#download awstats script
mkdir -p /root/plus/awstats
cd /root/plus/awstats
wget -nc -nd -S http://sme.swerts-knudsen.com/downloads/AwStats/install_awstats.sh -a /root/plus/plus.log
cd /root/plus
echo -n "."


#download securemail
mkdir -p /root/plus/securemail
cd /root/plus/securemail
wget -nc -nd -S -U "SMEupdate" http://www.pagefault.org/code/e-smith/securemail/6.0/e-smith-securemail-6.0.1-01dc.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S -U "SMEupdate" http://www.pagefault.org/code/e-smith/securemail/6.0/e-smith-smtp-authentication-6.0.1-02dc.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S -U "SMEupdate" http://www.pagefault.org/code/e-smith/securemail/6.0/e-smith-ssl-imap-6.0.1-02dc.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S -U "SMEupdate" http://www.pagefault.org/code/e-smith/securemail/6.0/e-smith-ssl-mailfront-6.0.1-02dc.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S -U "SMEupdate" http://www.pagefault.org/code/e-smith/securemail/6.0/e-smith-ssl-popd-6.0.1-02dc.noarch.rpm -a /root/plus/plus.log
echo -n "."

#download modindex
mkdir -p /root/plus/modindex
cd /root/plus/modindex
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/gzartman/Contribs/mod_perl/e-smith-mod_perl-0.0.1-2.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/gzartman/Beta/ModIndex/e-smith-modindex-0.0.5-2.noarch.rpm -a /root/plus/plus.log
echo -n "."

#download fetchmail pop3 contrib
mkdir -p /root/plus/fetchmail
cd /root/plus/fetchmail
wget -nc -nd -S http://www.schirrms.net/files/perl-CGI-FormMagick-0.89-08.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://www.schirrms.net/files/smeserver-fetchmail-1.3.4-09.noarch.rpm -a /root/plus/plus.log
echo -n "."

#download dungog contribs
mkdir -p /root/plus/dungog
cd /root/plus/dungog
#wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/dungog/packages/smeserver/6.0/i386/dungog/RPMS/dungog-proftpd-chroot-0.1-6.noarch.rpm -a /root/plus/plus.log
#wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/dungog/packages/smeserver/6.0/i386/dungog/RPMS/dungog-mailblocking-1.0-3.noarch.rpm -a /root/plus/plus.log
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/dungog/packages/smeserver/6.0/i386/dungog/RPMS/sme-server-update-system-1.0-3.noarch.rpm -a /root/plus/plus.log
echo -n "."

#download windows update cache manager
mkdir -p /root/plus/cache
cd /root/plus/cache
wget -nc -nd -S http://perso.wanadoo.fr/passionelectro/file_sme6/perl-Net-Telnet-3.03-1.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://perso.wanadoo.fr/passionelectro/file_sme6/perl-TimeDate-1.16-1.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://perso.wanadoo.fr/passionelectro/file_sme6/sme-cache-windows-1.0-4.noarch.rpm -a /root/plus/plus.log
echo -n "."

#download dhcp to dns synchroniser
mkdir -p /root/plus/dhcp-dns
cd /root/plus/dhcp-dns
wget -nc -nd -S http://www.activeservice.co.uk/sme/contribs/sme-dhcp-dns-0.9-rc1.noarch.rpm -a /root/plus/plus.log
echo -n "."

#download dhcp manager
mkdir -p /root/plus/dhcpmanager
cd /root/plus/dhcpmanager
wget -nc -nd -S http://www.developit.fr/FichePratique/SMEServer/perl-Net-Ping-2.24-1.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://www.developit.fr/FichePratique/SMEServer/wol-0.6.0-3.i386.rpm -a /root/plus/plus.log
wget -nc -nd -S http://www.developit.fr/FichePratique/SMEServer/e-smith-dhcpmanager-1.5-1.noarch.rpm -a /root/plus/plus.log
echo -n "."

#download print spooler manager
mkdir -p /root/plus/sacolprng
cd /root/plus/sacolprng
wget -nc -nd -S http://www.saco-support.de/sme/smeserver-lprng-monitor/smeserver-lprng-monitor-0.0.6-1.noarch.rpm -a /root/plus/plus.log
echo -n "."

#download mail log analyser
mkdir -p /root/plus/sacoisoqlog
cd /root/plus/sacoisoqlog
wget -nc -nd -S -a /root/plus/plus.log http://www.saco-support.de/sme/saco-mitel-isoqlog/saco-mitel-isoqlog-0.1-09.noarch.rpm
echo -n "."

#download rootkit hunter
mkdir -p /root/plus/rkhunter
cd /root/plus/rkhunter
wget -nc -nd -S -a /root/plus/plus.log http://mirror.contribs.org/smeserver/contribs/dthomas/smeserver/6.x/Contrib/rkhunter/smeserver-rkhunter-1.1.8-1.noarch.rpm
echo -n "."

# download Twig
mkdir -p /root/plus/twig
cd /root/plus/twig
wget -nc -nd -S -a /root/plus/plus.log http://www.smesmith.de/download/sme6/contribs/plus/twig/smeserver-twig-2.8.3-0.noarch.rpm
echo -n "."


#download raidmonitor
mkdir -p /root/plus/raid
cd /root/plus/raid
wget -nc -nd -S http://mirror.contribs.org/smeserver/contribs/dmay/smeserver/5.x/contrib/raidmonitor/dmc-mitel-raidmonitor-0.0.1-5.noarch.rpm -a /root/plus/plus.log
echo -n ".]"

else
  echo -n ".................]"
fi

cd /root/plus
clear
echo "Downloading Complete"
echo ""
echo "Now verifying download process completed with no errors"
echo ""
IS_ERROR=`pic /root/plus/plus.log | grep -c ERROR`

if [ $IS_ERROR -ge 1 ]; then
echo "It seems that $IS_ERROR file(s) failed to download, please review"
echo "/root/plus/plus.log, and edit the script as necessary."
echo "You may not have used the latest script. Please download that script again with"
echo ""
echo "  wget -N http://www.smesmith.de/update/smeplus.sh"
echo ""
echo "and try it once more."
echo ""
echo "If you are sure, that you have used the latest script: Do you want to inform stefan24 via e-mail about these errors? (y/n)"
echo ""
read errormail

if [ "$errormail" = "y" ]; then
 mail -s "Error in SME script" sme@braunstein.de </root/plus/plus.log
 echo "mail with plus.log sent to stefan24, one of the maintainers"
else
 echo "Please check , if you have used the latest script and update the Wiki page on contribs.org yourself"
 echo "if a link is really outdated"
 echo "This script was written and maintained by people like you :-)"
fi
echo ""
exit 1
fi

clear
echo "All files were downloaded successfully, cross your fingers, take a deep breath"
echo "...and if you dare press any key to continue"
read answer
echo ""
echo "Are you sure?  This could really screw up your server - press any key again"
echo "if this is a fresh install of SME 6.0.1-01 and you understand this may not"
echo "work as intended, is not an official update and may impair you from easily"
echo "updating to newer official versions of SME Server."
read answer

##############
#installation#
##############
clear
echo "Beginning Installation..."
echo ""


# PHP upgrade script copied from contribs.org/contribs/ergozd/scripts and edited a bit
cd /root/plus/phpupgrade
rpm -qa > rpmlist
IS_ODBC=`pic rpmlist | grep -c unixODBC`
if [ $IS_ODBC -eq 0 ]
then
    rpm -Uvh unixODBC-2.2.0-5.i386.rpm
else
    echo "unixODBC installed, skipping install"
fi
rpm -Uvh php*.rpm
mkdir -p /etc/e-smith/templates-custom/etc/php.ini
touch /etc/e-smith/templates-custom/etc/php.ini/50PathsDirectories
echo 'include_path        = ".:/usr/share/pear"' > /etc/e-smith/templates-custom/etc/php.ini/50PathsDirectories
echo 'doc_root            =' >> /etc/e-smith/templates-custom/etc/php.ini/50PathsDirectories
echo 'user_dir            =' >> /etc/e-smith/templates-custom/etc/php.ini/50PathsDirectories
echo 'extension_dir       = /usr/lib/php4' >> /etc/e-smith/templates-custom/etc/php.ini/50PathsDirectories
echo 'enable_dl           = On' >> /etc/e-smith/templates-custom/etc/php.ini/50PathsDirectories
pear upgrade Log
pear upgrade Date
/sbin/e-smith/expand-template /etc/php.ini
service httpd restart
# end PHP upgrade script


cd /root/plus/openssh
rpm -Uvh *.rpm
/sbin/e-smith/expand-template /etc/ssh/sshd_config
/sbin/e-smith/signal-event remoteaccess-update


cd /root/plus/openssl
rpm -Uvh *.rpm

cd /root/plus/webmail
rpm -Uvh e-smith-imp-1.10.0-04dm.noarch.rpm
rpm -Uvh imp-3.2.5-01dm.noarch.rpm
rpm -Uvh horde-2.2.5-1dm.noarch.rpm
rpm -Uvh turba-1.2.2-1es00.noarch.rpm
rpm -Uvh kronolith-1.1.2-1es.noarch.rpm
rpm -Uvh mnemo-1.1.2-1es.noarch.rpm
rpm -Uvh nag-1.1.1-1es.noarch.rpm
rpm -Uvh e-smith-kronolith-0.8.1-02.noarch.rpm
rpm -Uvh e-smith-mnemo-0.8.0-04.noarch.rpm
rpm -Uvh e-smith-nag-0.8.0-05.noarch.rpm
/sbin/e-smith/signal-event post-upgrade


cd /root/plus/apache
rpm -Uvh *.rpm

cd /root/plus/updates
rpm -Uvh *.rpm

cd /root/plus/MySQL_Upgrade
echo "Please ignore the warnings to change the MYSQL password and do NOT change it!"
echo "press Enter to continue"
read answer
# MySQL Update script copied from contribs.org/contribs/ergozd/scripts
# edited so we can benefit from download error checking in main script
# changed so if user has mysql 4.0.x (not .22) it will automatically update
rpm -qa > rpmlist
IS_SQL3=`pic rpmlist | grep -c mysql-3.23`
IS_SQL422=`pic rpmlist | grep -c MySQL-server-4.0.22`
if [ $IS_SQL422 -eq 1 ] ; then
        echo "You have the latest version, skipping mysql upgrade"
else
        cd /root/plus/MySQL_Upgrade
        if [ $IS_SQL3 -ne 0 ] ; then
                rpm -e --nodeps mysql mysql-server
                rpm -e mysql-devel
                rpm -e mysqlclient9
        fi
        service mysqld stop
        rpm -Uvh MySQL-*.rpm
        /sbin/chkconfig --levels 2345 mysql on
        if [ $IS_SQL3 -ne 0 ] ; then
                mv /etc/rc.d/init.d/mysql /etc/rc.d/init.d/mysqld
        fi
        rm /etc/rc.d/rc7.d/S90mysqld
        ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc7.d/S90mysqld
        /sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
        /sbin/e-smith/expand-template /etc/my.cnf
        /sbin/e-smith/expand-template /root/.my.cnf
        ln -s /usr/sbin/mysqld /usr/libexec/
        /sbin/service mysqld start
        sleep 10
        if [ $IS_SQL3 -ne 0 ] ; then
                /usr/bin/mysql_fix_privilege_tables
        fi
fi
# end of MySQL Update sript


if [ "$contribs" = "y" ]; then

cd /root/plus/lat-userpanel
rpm -Uvh *.rpm

cd /root/plus
lat-procmail -c "*|enabled|no|some|normal"

sh antivirus_install.sh

sh spamfilter_install.sh

cd /root/plus/phpmyadmin
rpm -Uvh e-smith-phpmyadmin-2.6.*.rpm


cd /root/plus/awstats
lat-ibays -a -c "awstats | awstats ibay | admin"
sh install_awstats.sh


cd /root/plus/securemail
rpm -ihv e-smith-securemail-6.0.1-01dc.noarch.rpm \
e-smith-smtp-authentication-6.0.1-02dc.noarch.rpm \
e-smith-ssl-imap-6.0.1-02dc.noarch.rpm \
e-smith-ssl-mailfront-6.0.1-02dc.noarch.rpm \
e-smith-ssl-popd-6.0.1-02dc.noarch.rpm


cd /root/plus/modindex
rpm -ivh e-smith-mod_perl-0.0.1-2.noarch.rpm
rpm -ivh e-smith-modindex-0.0.5-2.noarch.rpm
cd /root/plus

#double bounce email deletion - from sme.swerts-knudsen.com
mkdir -p /etc/e-smith/templates-custom/var/qmail/control
echo devnull > /etc/e-smith/templates-custom/var/qmail/control/doublebounceto
/sbin/e-smith/signal-event email-update
/etc/init.d/qmail restart

cd /root/plus/fetchmail
rpm -Uvh perl-CGI-FormMagick-0.89-08.noarch.rpm
rpm -Uvh smeserver-fetchmail-*.noarch.rpm

cd /root/plus/dungog
rpm -Uvh *.rpm

cd /root/plus/cache
rpm -Uvh perl-Net-Telnet-3.03-1.i386.rpm
rpm -Uvh perl-TimeDate-1.16-1.i386.rpm
rpm -Uvh sme-cache-windows-1.0-4.noarch.rpm

cd /root/plus/dhcp-dns
rpm -Uvh sme-dhcp-dns-0.9-rc1.noarch.rpm

cd /root/plus/dhcpmanager
rpm -Uvh perl-Net-Ping-2.24-1.i386.rpm
rpm -Uvh wol-0.6.0-3.i386.rpm
rpm -Uvh e-smith-dhcpmanager-1.4-7.noarch.rpm

cd /root/plus/sacolprng
rpm -Uvh smeserver-lprng-monitor-0.0.6-1.noarch.rpm

cd /root/plus/sacoisoqlog
rpm -Uvh *.rpm

cd /root/plus/rkhunter
rpm -ivh *.rpm

cd /root/plus/twig
rpm -Uvh smeserver-twig-*.rpm

cd /root/plus/raid
rpm -Uvh *.rpm

fi

/sbin/e-smith/signal-event post-upgrade

echo "The script is complete :-)"
echo "Now type 'exit' if you have recorded the script output and review smeplus.log"
echo "Then to reboot type '/sbin/e-smith/signal-event reboot'"

#end script