Index: openacs-4/etc/install/checkout.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/checkout.sh,v diff -u -r1.12 -r1.13 --- openacs-4/etc/install/checkout.sh 5 Nov 2003 11:50:36 -0000 1.12 +++ openacs-4/etc/install/checkout.sh 18 Nov 2003 10:36:40 -0000 1.13 @@ -94,7 +94,3 @@ echo $(date) > ${serverroot}/www/SYSTEM/checkout-date # Set proper privileges - -# Change owner and permissions on checked out files -chown -R ${aolsever_user}.${aolserver_group} ${serverroot} -chmod -R go+rwX ${serverroot} Index: openacs-4/etc/install/config-replace.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/config-replace.sh,v diff -u -r1.1 -r1.2 --- openacs-4/etc/install/config-replace.sh 4 Nov 2003 14:39:04 -0000 1.1 +++ openacs-4/etc/install/config-replace.sh 18 Nov 2003 10:36:40 -0000 1.2 @@ -1,7 +1,8 @@ #!/bin/sh # # There is some degree of duplication of parameters in the etc/install/install.tcl file -# and the etc/config.tcl file. This script will take +# and the etc/config.tcl file. This script will take parameter values in install.tcl +# and insert them in the config.tcl file so that the two are in sync. # # # The next line restarts using tclsh. Do not remove this backslash: \ @@ -57,23 +58,3 @@ file delete "${__config_file_path}.bak" file rename $__config_file_path "${__config_file_path}.bak" file rename $__new_config_file_path $__config_file_path - - -#---------------------------------------------------------------------- -# Create daemontools run file -#---------------------------------------------------------------------- - -set __run_file_path "${serverroot}/etc/daemontools/run" -set __new_run_file_path "${serverroot}/etc/daemontools/run.new" - -set __fd [open $__new_run_file_path w] -puts $__fd "#!/bin/sh" -puts $__fd "" -puts $__fd "exec ${aolserver_home}/bin/nsd-${database} -it ${serverroot}/etc/config.tcl -u ${aolserver_user} -g ${aolserver_group}" -close $__fd - -# Rename -file delete "${__run_file_path}.bak" -file rename $__run_file_path "${__run_file_path}.bak" -file rename $__new_run_file_path $__run_file_path - Index: openacs-4/etc/install/install.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/install.sh,v diff -u -r1.29 -r1.30 --- openacs-4/etc/install/install.sh 5 Nov 2003 14:38:52 -0000 1.29 +++ openacs-4/etc/install/install.sh 18 Nov 2003 10:36:40 -0000 1.30 @@ -202,7 +202,7 @@ if parameter_true $use_daemontools; then $svc_bindir/svc -d ${svscanroot} - echo "$0: supervise status is: $(svstat ${svscanroot})" + echo "$0: supervise status is: $($svc_bindir/svstat ${svscanroot})" else # non-daemontools stop $stop_server_command @@ -271,7 +271,7 @@ fi if [ -r "$svscan_sourcedir" ]; then $svc_bindir/svc -dx $svscan_sourcedir - echo "$0: supervise status is: $(svstat ${svscanroot})" + echo "$0: supervise status is: $($svc_bindir/svstat ${svscanroot})" fi fi @@ -287,14 +287,6 @@ chmod +x checkout.sh config_file=$config_file dotlrn=$dotlrn ./checkout.sh - if [ -z "$aolserver_config_file" ]; then - # No AOLserver config file specified - we are using the standard etc/config.tcl file. - # We need to update it with settings in install.tcl since certain parameters - # (such as serverroot) are duplicated between the two files. - ./config-replace.sh $config_file - chmod +x $serverroot/etc/daemontools/run - fi - # The post_checkout script can copy back any files (AOLServer config files, # log files etc.) under the new source tree, and apply any patches # that should be applied (see README). @@ -312,7 +304,7 @@ # allow svscan to start echo "$0: Waiting for 10 seconds for svscan to come up at $(date)" sleep 10 - echo "$0: supervise status is: $(svstat ${svscanroot})" + echo "$0: supervise status is: $($svc_bindir/svstat ${svscanroot})" echo "$0: daemontools errors: : $(ps -auxw | grep readproctitle)" # Check if svgroup is present, and if so, use it if which svgroup &> /dev/null; then @@ -322,16 +314,41 @@ fi fi +if [ -z "$aolserver_config_file" ]; then + # No AOLserver config file specified - we are using the standard etc/config.tcl file. + # We need to update it with settings in install.tcl since certain parameters + # (such as serverroot) are duplicated between the two files. + echo "$0: Editing AOLserver config file with parameter settings in install.tcl" + ./config-replace.sh $config_file + chmod +x $svscan_sourcedir/run +else + # Copy specified config file to the right path + echo "$0: Copying custom AOLserver config file $aolserver_config_file" + cp $aolserver_config_file $serverroot/etc/config.tcl +fi + +# Edit the run script +echo "$0: Editing run script at $svscan_sourcedir/run" +./run-create.sh $config_file +chmod +x $svscan_sourcedir/run + +# Make sure we always have sensible ownership and permissions in the whole source tree +echo "$0: Setting permissions and ownership for files under ${serverroot}" +chown -R ${aolserver_user}.${aolserver_group} ${serverroot} +chmod -R go+rwX ${serverroot} + # Bring up the server again -echo "$0: Bringing the server $serverroot back up at $date with command $command" if parameter_true $use_daemontools; then if [ -f $svscanroot/down ]; then rm $svscanroot/down fi - $svc_bindir/svc -u $svscanroot - echo "$0: supervise status is: $(svstat ${svscanroot})" + command="$svc_bindir/svc -u $svscanroot" + echo "$0: Bringing the server $serverroot back up at $(date) with command $command" + $command + echo "$0: supervise status is: $($svc_bindir/svstat ${svscanroot})" else # non-daemontools command + echo "$0: Bringing the server $serverroot back up at $(date) with command $start_server_command" $start_server_command fi