3 # Automatic script to install Citadel on a target system.
4 # Copyright (C) 2004 Michael Hampton <error@citadel.org>
5 # Copyright (C) 2004-2015 Art Cancro <ajc@citadel.org>
7 # This program is open source software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License version 3.
10 # Our favorite operating system is called Linux.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # Reading this script? Here's some helpful hints:
19 # If you're seeing this in your browser, it's probably not what you want.
20 # You can either save it to disk and run it, or do it the easy way:
22 # curl http://easyinstall.citadel.org/install | sh
24 # Note that this script installs software on your system and so it requires
25 # root privileges. Feel free to inspect the script to make sure we didn't
26 # do anything stupid...
28 # We have provided you the source code according to the terms of the respective
29 # software licenses included in the source code packages, even if you choose
30 # not to keep the source code around. You can always download it again later.
32 # We install the "latest" or "stable" versions of these packages:
34 # Citadel server, WebCit, libcitadel, libical, Berkeley DB, libSieve, Expat
36 # Do *not* attempt to do anything with the UNATTENDED_BUILD mode. This is
37 # for our use only and is not only unsupported, but we will deliberately break
38 # it from time to time in order to prevent you from trying to use it.
40 ###############################################################################
42 # This is the general stuff we're going to do, in order:
44 # 1. Gather information about the target system
45 # 2. Present the installation steps (from 1 above) to the user
46 # 3. Present any pre-install customizations to the user
47 # 4. Do the installation
48 # A. Download any source code files packages required
49 # B. If we build our own, compile and install prerequisites then Citadel
50 # 5. Do post-installation setup
54 ###############################################################################
57 # Begin user customization area
59 # These two directories specify where Citadel and its private support
60 # libraries will be installed. This keeps them safely tucked away from
61 # the rest of your system. The defaults should be fine for most people.
63 SUPPORT=/usr/local/ctdlsupport
64 CITADEL=/usr/local/citadel
65 WEBCIT=/usr/local/webcit
67 BUILD=$WORKDIR/citadel-build.$$
68 LOG=$WORKDIR/citadel-install-log.txt
69 export SUPPORT CITADEL WEBCIT
74 # End user customization area
76 # We're now exporting a bunch of environment variables, and here's a list:
77 # CITADEL_INSTALLER Set to "web" to indicate this script
78 # CITADEL Directory where Citadel is installed
79 # WEBCIT Directory where WebCit is installed
80 # SUPPORT Directory where support programs are installed
81 # DISTRO_MAJOR Linux distribution name, if applicable
82 # DISTRO_MINOR Linux distribution name, if applicable
83 # DISTRO_VERSION Linux distribution version (major digit) if applicable
84 # CC C compiler being used
85 # MAKE Make program being used
86 # CFLAGS C compiler flags
87 # LDFLAGS Linker flags
88 # IS_UPGRADE Set to "yes" if upgrading an existing Citadel
89 # CTDL_DIALOG Where (if at all) the "whiptail" or "dialog" program may be found
91 # Let Citadel setup recognize the Citadel installer
93 export CITADEL_INSTALLER
95 SETUP="Citadel Easy Install"
96 DOWNLOAD_SITE=http://easyinstall.citadel.org
98 # Original source code packages.
99 DB_SOURCE=db-5.1.29.NC.tar.gz
100 ICAL_SOURCE=libical-easyinstall.tar.gz
101 LIBSIEVE_SOURCE=libsieve-2.2.7-ctdl2.tar.gz
102 EXPAT_SOURCE=expat-2.0.1.tar.gz
103 LIBCURL_SOURCE=curl-7.26.0.tar.gz
104 LIBEV_SOURCE=libev-4.11.tar.gz
105 CARES_SOURCE=c-ares-1.7.5.tar.gz
106 LIBCITADEL_SOURCE=libcitadel-easyinstall.tar.gz
107 CITADEL_SOURCE=citadel-easyinstall.tar.gz
108 WEBCIT_SOURCE=webcit-easyinstall.tar.gz
109 TEXTCLIENT_SOURCE=textclient-easyinstall.tar.gz
115 LDADD="-L/usr/local/lib"
116 INCADD="-I/usr/local/include"
120 ##### BEGIN Functions #####
124 VERSION=`cat $1 | tr "\n" ' ' | sed s/.*VERSION.*=\ // `
130 echo $SETUP is aborting.
132 echo A log file has been written to $LOG
133 echo Reading this file may tell you what went wrong. If you
134 echo need to ask for help on the support forum, please post the
135 echo last screenful of text from this log.
137 echo Operating system: ${OSSTR}
138 echo Operating system: ${OSSTR} >>$LOG
147 tempfilename=test$$.sh
149 echo '#!/bin/sh' >$tempfilename
150 echo '' >>$tempfilename
151 echo 'exit 0' >>$tempfilename
152 chmod 700 $tempfilename
154 [ -x $tempfilename ] || {
155 echo Cannot write to `pwd`
156 echo 'Are you not running this program as root?'
161 echo Cannot execute a script.
162 echo 'If /tmp is mounted noexec, please change this before continuing.'
171 WGET=`which wget 2>/dev/null`
172 CURL=`which curl 2>/dev/null`
173 if [ -n "${WGET}" -a -x "${WGET}" ]; then
174 $WGET $DOWNLOAD_SITE/$FILENAME >/dev/null 2>>$LOG || die
176 if [ -n "${CURL}" -a -x "${CURL}" ]; then
177 $CURL $DOWNLOAD_SITE/$FILENAME >$FILENAME 2>>$LOG || die
179 echo Unable to find a wget or curl command.
180 echo $SETUP cannot continue.
189 cd $BUILD >>$LOG 2>&1 || die
190 FILENAME=libical-easyinstall.sum ; download_this
191 SUM=`cat libical-easyinstall.sum`
192 SUMFILE=$SUPPORT/etc/libical-easyinstall.sum
193 if [ -r $SUMFILE ] ; then
194 OLDSUM=`cat $SUMFILE`
195 if [ "$SUM" = "$OLDSUM" ] ; then
196 echo "* libical does not need updating."
200 echo "* Downloading libical..."
201 FILENAME=$ICAL_SOURCE ; download_this
202 echo "* Installing libical..."
203 ( gzip -dc $ICAL_SOURCE | tar -xf - ) >>$LOG 2>&1 || die
204 cd $BUILD/libical >>$LOG 2>&1 || die
205 ./configure --prefix=$SUPPORT >>$LOG 2>&1 || die
206 $MAKE $MAKEOPTS >>$LOG 2>&1 || die
207 $MAKE install >>$LOG 2>&1 || die
210 rm -f $CITADEL/citadel-easyinstall.sum 2>/dev/null
211 rm -f $WEBCIT/webcit-easyinstall.sum 2>/dev/null
214 install_libsieve () {
215 cd $BUILD >>$LOG 2>&1 || die
216 FILENAME=libsieve-easyinstall.sum ; download_this
217 SUM=`cat libsieve-easyinstall.sum`
218 SUMFILE=$SUPPORT/etc/libsieve-easyinstall.sum
219 if [ -r $SUMFILE ] ; then
220 OLDSUM=`cat $SUMFILE`
221 if [ "$SUM" = "$OLDSUM" ] ; then
222 echo "* libsieve does not need updating."
226 echo "* Downloading libsieve..."
227 FILENAME=$LIBSIEVE_SOURCE ; download_this
228 echo "* Installing libsieve..."
229 ( gzip -dc $LIBSIEVE_SOURCE | tar -xf - ) >>$LOG 2>&1 || die
230 cd $BUILD/libsieve-2.2.7/src >>$LOG 2>&1 || die
231 ./configure --prefix=$SUPPORT >>$LOG 2>&1 || die
232 $MAKE $MAKEOPTS >>$LOG 2>&1 || die
233 $MAKE install >>$LOG 2>&1 || die
236 rm -f $CITADEL/citadel-easyinstall.sum 2>/dev/null
240 cd $BUILD >>$LOG 2>&1 || die
241 FILENAME=expat-easyinstall.sum ; download_this
242 SUM=`cat expat-easyinstall.sum`
243 SUMFILE=$SUPPORT/etc/expat-easyinstall.sum
244 if [ -r $SUMFILE ] ; then
245 OLDSUM=`cat $SUMFILE`
246 if [ "$SUM" = "$OLDSUM" ] ; then
247 echo "* expat does not need updating."
251 echo "* Downloading expat..."
252 FILENAME=$EXPAT_SOURCE ; download_this
253 echo "* Installing Expat..."
254 ( gzip -dc $EXPAT_SOURCE | tar -xf - ) >>$LOG 2>&1 || die
255 cd $BUILD/expat-2.0.1 >>$LOG 2>&1 || die
256 ./configure --prefix=$SUPPORT >>$LOG 2>&1 || die
257 $MAKE $MAKEOPTS >>$LOG 2>&1 || die
258 $MAKE install >>$LOG 2>&1 || die
261 rm -f $CITADEL/citadel-easyinstall.sum 2>/dev/null
266 cd $BUILD >>$LOG 2>&1 || die
267 FILENAME=libcurl-easyinstall.sum ; download_this
268 SUM=`cat libcurl-easyinstall.sum`
269 SUMFILE=$SUPPORT/etc/libcurl-easyinstall.sum
270 if [ -r $SUMFILE ] ; then
271 OLDSUM=`cat $SUMFILE`
272 if [ "$SUM" = "$OLDSUM" ] ; then
273 echo "* libcurl does not need updating."
277 echo "* Downloading libcurl..."
278 FILENAME=$LIBCURL_SOURCE ; download_this
279 echo "* Installing libcurl..."
280 ( gzip -dc $LIBCURL_SOURCE | tar -xf - ) >>$LOG 2>&1 || die
281 CFLAGS="${CFLAGS} -I${SUPPORT}/include ${INCADD} -g"
283 LDFLAGS="-L${SUPPORT}/lib -Wl,--rpath -Wl,${SUPPORT}/lib ${LDADD}"
284 export CFLAGS CPPFLAGS LDFLAGS
286 cd $BUILD/curl-7.26.0 >>$LOG 2>&1 || die
287 ./configure --prefix=$SUPPORT --disable-file --disable-ldap --disable-ldaps \
288 --disable-dict --disable-telnet --disable-tftp --disable-manual \
289 --enable-thread --disable-sspi --disable-crypto-auth --disable-cookies \
290 --without-libssh2 --without-ca-path --without-libidn \
291 --enable-ares=$SUPPORT \
293 $MAKE $MAKEOPTS >>$LOG 2>&1 || die
294 $MAKE install >>$LOG 2>&1 || die
297 rm -f $CITADEL/citadel-easyinstall.sum 2>/dev/null
302 cd $BUILD >>$LOG 2>&1 || die
303 FILENAME=libev-easyinstall.sum ; download_this
304 SUM=`cat libev-easyinstall.sum`
305 SUMFILE=$SUPPORT/etc/libev-easyinstall.sum
306 if [ -r $SUMFILE ] ; then
307 OLDSUM=`cat $SUMFILE`
308 if [ "$SUM" = "$OLDSUM" ] ; then
309 echo "* libev does not need updating."
313 echo "* Downloading libev..."
314 FILENAME=$LIBEV_SOURCE ; download_this
315 echo "* Installing libev..."
316 ( gzip -dc $LIBEV_SOURCE | tar -xf - ) >>$LOG 2>&1 || die
317 cd $BUILD/libev-4.11 >>$LOG 2>&1 || die
318 ./configure --prefix=$SUPPORT >>$LOG 2>&1 || die
319 $MAKE $MAKEOPTS >>$LOG 2>&1 || die
320 $MAKE install >>$LOG 2>&1 || die
323 rm -f $CITADEL/citadel-easyinstall.sum 2>/dev/null
328 cd $BUILD >>$LOG 2>&1 || die
329 FILENAME=c-ares-easyinstall.sum ; download_this
330 SUM=`cat c-ares-easyinstall.sum`
331 SUMFILE=$SUPPORT/etc/c-ares-easyinstall.sum
332 if [ -r $SUMFILE ] ; then
333 OLDSUM=`cat $SUMFILE`
334 if [ "$SUM" = "$OLDSUM" ] ; then
335 echo "* c-ares does not need updating."
339 echo "* Downloading libev..."
340 FILENAME=$CARES_SOURCE ; download_this
341 echo "* Installing c-ares..."
342 ( gzip -dc $CARES_SOURCE | tar -xf - ) >>$LOG 2>&1 || die
343 cd $BUILD/c-ares-1.7.5 >>$LOG 2>&1 || die
344 ./configure --prefix=$SUPPORT >>$LOG 2>&1 || die
345 $MAKE $MAKEOPTS >>$LOG 2>&1 || die
346 $MAKE install >>$LOG 2>&1 || die
349 rm -f $SUPPORT/etc/libcurl-easyinstall.sum 2>/dev/null
350 rm -f $CITADEL/citadel-easyinstall.sum 2>/dev/null
354 install_libcitadel () {
355 cd $BUILD >>$LOG 2>&1 || die
356 FILENAME=libcitadel-easyinstall.sum ; download_this
357 SUM=`cat libcitadel-easyinstall.sum`
358 SUMFILE=$SUPPORT/etc/libcitadel-easyinstall.sum
359 if [ -r $SUMFILE ] ; then
360 OLDSUM=`cat $SUMFILE`
361 if [ "$SUM" = "$OLDSUM" ] ; then
362 echo "* libcitadel does not need updating."
366 echo "* Downloading libcitadel..."
367 FILENAME=$LIBCITADEL_SOURCE ; download_this
368 echo "* Installing libcitadel..."
369 ( gzip -dc $LIBCITADEL_SOURCE | tar -xf - ) >>$LOG 2>&1 || die
370 cd $BUILD/libcitadel >>$LOG 2>&1 || die
371 ./configure --prefix=$SUPPORT >>$LOG 2>&1 || die
372 $MAKE $MAKEOPTS >>$LOG 2>&1 || die
373 $MAKE install >>$LOG 2>&1 || die
376 # Upgrading libcitadel forces the upgrade of programs which link to it
377 rm -f $CITADEL/citadel-easyinstall.sum 2>/dev/null
378 rm -f $CITADEL/webcit-easyinstall.sum 2>/dev/null
379 rm -f $CITADEL/textclient-easyinstall.sum 2>/dev/null
383 cd $BUILD >>$LOG 2>&1 || die
384 FILENAME=db-easyinstall.sum ; download_this
385 SUM=`cat db-easyinstall.sum`
386 SUMFILE=$SUPPORT/etc/db-easyinstall.sum
387 if [ -r $SUMFILE ] ; then
388 OLDSUM=`cat $SUMFILE`
389 if [ "$SUM" = "$OLDSUM" ] ; then
390 echo "* Berkeley DB does not need updating."
394 echo "* Downloading Berkeley DB..."
395 FILENAME=$DB_SOURCE ; download_this
396 echo "* Installing Berkeley DB..."
397 ( gzip -dc $DB_SOURCE | tar -xf - ) >>$LOG 2>&1 || die
398 cd $BUILD/db-5.1.29.NC/build_unix >>$LOG 2>&1 || die
399 ../dist/configure --prefix=$SUPPORT --disable-compat185 --disable-cxx --disable-debug --disable-dump185 --disable-java --disable-tcl --disable-test --without-rpm >>$LOG 2>&1 || die
400 $MAKE $MAKEOPTS >>$LOG 2>&1 || die
401 $MAKE install >>$LOG 2>&1 || die
404 rm -f $CITADEL/citadel-easyinstall.sum 2>/dev/null
407 install_prerequisites () {
409 # Create the support directories if they don't already exist
411 mkdir $SUPPORT 2>/dev/null
412 mkdir $SUPPORT/bin 2>/dev/null
413 mkdir $SUPPORT/sbin 2>/dev/null
414 mkdir $SUPPORT/lib 2>/dev/null
415 mkdir $SUPPORT/libexec 2>/dev/null
416 mkdir $SUPPORT/include 2>/dev/null
417 mkdir $SUPPORT/etc 2>/dev/null
425 if [ -z "$OK_LIBSIEVE" ]
433 if [ -z "$OK_EXPAT" ]
437 if [ -z "$OK_LIBEV" ]
441 if [ -z "$OK_CARES" ]
445 if [ -z "$OK_LIBCURL" ]
455 cd $BUILD >>$LOG 2>&1 || die
456 if [ x$IS_UPGRADE = xyes ]
458 echo "* Upgrading your existing Citadel installation."
461 CFLAGS="${CFLAGS} -I${SUPPORT}/include ${INCADD} -g"
463 LDFLAGS="-L${SUPPORT}/lib -Wl,--rpath -Wl,${SUPPORT}/lib ${LDADD}"
464 export CFLAGS CPPFLAGS LDFLAGS
466 DO_INSTALL_CITADEL=yes
467 FILENAME=citadel-easyinstall.sum ; download_this
468 SUM=`cat citadel-easyinstall.sum`
469 SUMFILE=$CITADEL/citadel-easyinstall.sum
470 if [ -r $SUMFILE ] ; then
471 OLDSUM=`cat $SUMFILE`
472 if [ "$SUM" = "$OLDSUM" ] ; then
473 echo "* Citadel does not need updating."
474 DO_INSTALL_CITADEL=no
478 if [ $DO_INSTALL_CITADEL = yes ] ; then
479 echo "* Downloading Citadel..."
480 FILENAME=$CITADEL_SOURCE ; download_this
481 echo "* Installing Citadel..."
482 cd $BUILD >>$LOG 2>&1 || die
483 ( gzip -dc $CITADEL_SOURCE | tar -xf - ) >>$LOG 2>&1 || die
484 cd $BUILD/citadel >>$LOG 2>&1 || die
487 ./configure --prefix=$CITADEL --with-db=$SUPPORT --with-pam --with-libical --disable-threaded-client >>$LOG 2>&1 || die
489 ./configure --prefix=$CITADEL --with-db=$OK_DB --with-pam --with-libical --disable-threaded-client >>$LOG 2>&1 || die
491 $MAKE $MAKEOPTS >>$LOG 2>&1 || die
492 if [ x$IS_UPGRADE = xyes ]
494 echo "* Performing Citadel upgrade..."
495 $MAKE upgrade >>$LOG 2>&1 || die
497 echo "* Performing Citadel install..."
498 $MAKE install >>$LOG 2>&1 || die
499 useradd -c "Citadel service account" -d $CITADEL -s $CITADEL/citadel citadel >>$LOG 2>&1
504 ## begin webcit install
506 cd $BUILD >>$LOG 2>&1 || die
507 DO_INSTALL_WEBCIT=yes
508 FILENAME=webcit-easyinstall.sum ; download_this
509 SUM=`cat webcit-easyinstall.sum`
510 SUMFILE=$WEBCIT/webcit-easyinstall.sum
511 if [ -r $SUMFILE ] ; then
512 OLDSUM=`cat $SUMFILE`
513 if [ "$SUM" = "$OLDSUM" ] ; then
514 echo "* WebCit does not need updating."
519 if [ $DO_INSTALL_WEBCIT = yes ] ; then
520 echo "* Downloading WebCit..."
521 FILENAME=$WEBCIT_SOURCE ; download_this
522 echo "* Installing WebCit..."
523 cd $BUILD >>$LOG 2>&1 || die
524 ( gzip -dc $WEBCIT_SOURCE | tar -xf - ) >>$LOG 2>&1 || die
525 cd $BUILD/webcit >>$LOG 2>&1 || die
526 ./configure --prefix=$WEBCIT --with-libical >>$LOG 2>&1 || die
527 $MAKE $MAKEOPTS >>$LOG 2>&1 || die
528 rm -fr $WEBCIT/static 2>&1
529 $MAKE install >>$LOG 2>&1 || die
534 ## begin text client install
536 cd $BUILD >>$LOG 2>&1 || die
537 DO_INSTALL_TEXTCLIENT=yes
538 FILENAME=textclient-easyinstall.sum ; download_this
539 SUM=`cat textclient-easyinstall.sum`
540 SUMFILE=$CITADEL/webcit-easyinstall.sum
541 if [ -r $SUMFILE ] ; then
542 OLDSUM=`cat $SUMFILE`
543 if [ "$SUM" = "$OLDSUM" ] ; then
544 echo "* Citadel text mode client does not need updating."
545 DO_INSTALL_TEXTCLIENT=no
549 if [ $DO_INSTALL_TEXTCLIENT = yes ] ; then
550 echo "* Downloading the Citadel text mode client..."
551 FILENAME=$TEXTCLIENT_SOURCE ; download_this
552 echo "* Installing the Citadel text mode client..."
553 cd $BUILD >>$LOG 2>&1 || die
554 ( gzip -dc $TEXTCLIENT_SOURCE | tar -xf - ) >>$LOG 2>&1 || die
555 cd $BUILD/textclient >>$LOG 2>&1 || die
556 ./configure --prefix=$CITADEL >>$LOG 2>&1 || die
557 $MAKE $MAKEOPTS >>$LOG 2>&1 || die
558 $MAKE install >>$LOG 2>&1 || die
566 echo "* Configuring your system ..."
568 if [ x$IS_UPGRADE = xyes ]
570 echo Upgrading your existing Citadel installation.
572 echo This is a new Citadel installation.
575 if [ -x /etc/init.d/citadel ] ; then
576 echo Stopping any previously running Citadel server...
577 /etc/init.d/citadel stop
580 # If we are running a Linux operating system we try even harder to stop citserver
581 if uname -a | grep -i linux ; then
582 if ps ax | grep citserver | grep -v grep ; then
583 echo citserver still running ... trying again to terminate it
589 # If we are running a Linux operating system we try even harder to stop citserver
590 if uname -a | grep -i linux ; then
591 if ps ax | grep citserver | grep -v grep ; then
592 echo citserver still running ... trying again to terminate it
598 FILENAME=citadel-init-scripts.tar ; download_this
599 cat citadel-init-scripts.tar | (cd / ; tar xvf - )
600 echo Starting Citadel server...
601 /etc/init.d/citadel start
603 $CITADEL/setup </dev/tty || die
604 $WEBCIT/setup </dev/tty || die
609 ##### END Functions #####
611 ##### BEGIN main #####
614 # 0. Test to make sure we're running as root
616 PERMSTESTDIR=/usr/local/ctdltest.$$
617 mkdir $PERMSTESTDIR || {
619 echo 'Easy Install is unable to create subdirectories in /usr/local.'
620 echo 'Did you forget to run the install command as the root user?'
621 echo 'Please become root (with a command like "su" or "sudo su") and'
626 rmdir $PERMSTESTDIR 2>/dev/null
628 # 1. Gather information about the target system
630 # Non-GNU make does not work.
631 # This probably ought to be fixed, but for now we will simply require GNU make.
634 if gmake -v 2>&1 | grep -i GNU ; then
637 if make -v 2>&1 | grep -i GNU ; then
642 if [ $MAKE == xx ] ; then
644 echo 'Easy Install requires GNU Make (gmake), which was not found.'
645 echo 'Please install gmake and try again.'
658 rm -f $LOG 2>/dev/null
661 # Determine which operating system we are running on
667 if [ "${OS}" = "SunOS" ] ; then
670 OSSTR="${OS} ${REV}(${ARCH} `uname -v`)"
671 elif [ "${OS}" = "AIX" ] ; then
672 OSSTR="${OS} `oslevel` (`oslevel -r`)"
673 elif [ "${OS}" = "Linux" ] ; then
675 if [ -f /etc/redhat-release ] ; then
677 PSUEDONAME=`cat /etc/redhat-release | sed s/.*\(// | sed s/\)//`
678 REV=`cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//`
679 elif [ -f /etc/SUSE-release ] ; then
680 DIST=`cat /etc/SUSE-release | tr "\n" ' '| sed s/VERSION.*//`
681 REV=`cat /etc/SUSE-release | tr "\n" ' ' | sed s/.*=\ //`
682 elif [ -f /etc/mandrake-release ] ; then
684 PSUEDONAME=`cat /etc/mandrake-release | sed s/.*\(// | sed s/\)//`
685 REV=`cat /etc/mandrake-release | sed s/.*release\ // | sed s/\ .*//`
686 elif [ -f /etc/debian_version ] ; then
687 DIST="Debian `cat /etc/debian_version`"
691 if [ -f /etc/UnitedLinux-release ] ; then
692 DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]"
695 OSSTR="${OS} ${DIST} ${REV}(${PSUEDONAME} ${KERNEL} ${MACH})"
705 # 2. Present the installation steps (from 1 above) to the user
707 if whiptail --infobox "Welcome to Citadel Easy Install" 10 70 2>/dev/null
709 CTDL_DIALOG=`which whiptail`
716 echo "Welcome to $SETUP"
717 echo Running on: ${OSSTR}
718 echo "We will perform the following actions:"
721 echo "* Download/install supporting libraries (if needed)"
722 echo "* Download/install Citadel (if needed)"
723 echo "* Download/install WebCit (if needed)"
725 echo "Configuration:"
726 echo "* Configure Citadel"
727 echo "* Configure WebCit"
729 echo -n "Perform the above installation steps now? "
730 if [ x$UNATTENDED_BUILD = "xYOU_BETCHA" ] ; then
737 if [ "`echo $yesno | cut -c 1 | tr N n`" = "n" ]; then
742 FILENAME=gpl.txt ; download_this
745 echo "Do you accept the terms of this license?"
746 echo "If you do not accept the General Public License, Easy Install will exit."
747 echo -n "Enter Y or Yes to accept: "
748 if [ x$UNATTENDED_BUILD = "xYOU_BETCHA" ] ; then
754 if [ "`echo $yesno | cut -c 1 | tr N n`" = "n" ]; then
759 if [ -f $CITADEL/citadel.config ]
762 echo "* Upgrading your existing Citadel installation."
765 echo "* This is a NEW Citadel installation."
768 if [ x$IS_UPGRADE = xyes ]
771 echo "This appears to be an upgrade of an existing Citadel installation."
772 echo -n "Have you performed a FULL BACKUP of your programs and data? "
773 if [ x$UNATTENDED_BUILD = "xYOU_BETCHA" ] ; then
779 if [ "`echo $yesno | cut -c 1 | tr N n`" = "n" ]; then
781 echo "citadel.org does not provide emergency support for sites"
782 echo "which broke irrecoverably during a failed upgrade."
783 echo "Easy Install will now exit."
791 echo "Installation will now begin."
792 echo "Command output will not be sent to the terminal."
793 echo "To view progress, see the $LOG file."
796 # 3. Do the installation
798 install_prerequisites
801 # 4. Do post-installation setup
803 if [ x$UNATTENDED_BUILD = "xYOU_BETCHA" ] ; then