Index: openacs-4/etc/install/checkout.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/checkout.sh,v diff -u -r1.1 -r1.2 --- openacs-4/etc/install/checkout.sh 4 Sep 2003 16:51:26 -0000 1.1 +++ openacs-4/etc/install/checkout.sh 5 Sep 2003 07:37:09 -0000 1.2 @@ -2,8 +2,7 @@ # # Read the README file before executing this script. # -# Checks out all source code needed for .LRN from CVS and copies -# the supervise run script that runs AOLServer to the server root directory. +# Checks out all source code needed for OpenACS and .LRN from CVS # # This script should be executed as root and requires the following # environment variables to be set: Index: openacs-4/etc/install/config.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/Attic/config.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/etc/install/config.tcl 4 Sep 2003 16:51:26 -0000 1.1 +++ openacs-4/etc/install/config.tcl 5 Sep 2003 07:37:09 -0000 1.2 @@ -23,11 +23,11 @@ # AOLServer configuration set serverroot "/var/lib/aolserver/${server}" -set svscanroot "/var/lib/svscan" +set svscanroot "/var/lib/svscan/${server}" set server_url "http://localhost:8000" set error_log_file "${serverroot}/log/error.log" -set start_server_command "svc -u ${svscanroot}/$server" -set stop_server_command "svc -d ${svscanroot}/$server" +set start_server_command "rm ${svscanroot}/down; svc -u ${svscanroot}" +set stop_server_command "svc -d ${svscanroot}" set restart_server_command "svc -t ${svscanroot}/$server" # Time from invocation of startup command until the server is actually up set startup_seconds 20 Index: openacs-4/etc/install/install.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/install.sh,v diff -u -r1.1 -r1.2 --- openacs-4/etc/install/install.sh 4 Sep 2003 16:51:26 -0000 1.1 +++ openacs-4/etc/install/install.sh 5 Sep 2003 07:37:09 -0000 1.2 @@ -46,6 +46,7 @@ # Set important configuration parameters serverroot=`get_config_param serverroot` +svscanroot=`get_config_param svscanroot` database=`get_config_param database` server_url=`get_config_param server_url` error_log_file=`get_config_param error_log_file` @@ -59,7 +60,7 @@ dotlrn_demo_data=`get_config_param dotlrn_demo_data` dotlrn=`get_config_param dotlrn` crawl_links=`get_config_param crawl_links` - +do_checkout=`get_config_param do_checkout` # command-line settings override config file settings while [ -n "$1" ] ; do case "$1" in @@ -111,14 +112,28 @@ # Log some important parameters for the installation echo "$0: Starting installation with config_file $config_file. Using serverroot=$serverroot, server_url=$server_url, do_checkout=$do_checkout, dotlrn=$dotlrn, and database=$database." prompt_continue $interactive +set -x +# See if a daemontools directory exists. -# Take down the server -echo "$0: Taking down $serverroot at $(date)" -$stop_server_command -# Wait for the server to come down -echo "$0: Waiting $shutdown_seconds seconds for server to shut down at $(date)" -sleep $shutdown_seconds +if [ -d "${svscanroot}" ]; then + # if so, cycle the server. + echo "$0: Taking down $serverroot at $(date)" + $stop_server_command + # Wait for the server to come down + echo "$0: Waiting $shutdown_seconds seconds for server to shut down at $(date)" + sleep $shutdown_seconds +else + # if not, create one + echo "$0: Creating daemontools directory" + # TODO: should put error handling here and a config param to make this optional + #create the directory disabled + touch $svscanroot/down + ln -s $serverroot/etc/daemontools $svscanroot +fi + + + # Recreate the database user echo "$0: Recreating database user at $(date)" if [ $database == "postgres" ]; then