Commit f5efee40 authored by Frank Bergmann's avatar Frank Bergmann

- OpenACS 5.9

parent 64338980
......@@ -2,15 +2,15 @@
<!-- Generated by the OpenACS Package Manager -->
<package key="acs-automated-testing" url="http://openacs.org/repository/apm/packages/acs-automated-testing/" type="apm_service">
<package-name>Automated Testing</package-name>
<pretty-plural>Automated Testing</pretty-plural>
<package-name>ACS Automated Testing</package-name>
<pretty-plural>ACS Automated Testing</pretty-plural>
<initial-install-p>t</initial-install-p>
<singleton-p>t</singleton-p>
<version name="5.10.0d1" url="http://openacs.org/repository/download/apm/acs-automated-testing-5.10.0d1.apm">
<version name="5.9.0" url="http://openacs.org/repository/download/apm/acs-automated-testing-5.9.0.apm">
<owner url="http://openacs.org">OpenACS</owner>
<summary>The interface to the automated testing facilities within OpenACS.</summary>
<release-date>2013-09-08</release-date>
<release-date>2015-10-04</release-date>
<vendor url="http://openacs.org">OpenACS</vendor>
<maturity>3</maturity>
<license url="http://www.gnu.org/copyleft/gpl.html">GPL version 2</license>
......@@ -19,8 +19,8 @@
OpenACS system. Also provides a UI for managing
automatic-rebuild servers as in a test farm.</description>
<provides url="acs-automated-testing" version="5.10.0d1"/>
<requires url="acs-kernel" version="5.10.0d1"/>
<provides url="acs-automated-testing" version="5.9.0"/>
<requires url="acs-kernel" version="5.9.0"/>
<callbacks>
</callbacks>
......
......@@ -7,3 +7,9 @@ ad_library {
}
# LARS: Moved to aa-test-procs.tcl file. See comment there.
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
This diff is collapsed.
......@@ -42,3 +42,9 @@ ad_proc -public aa_example_write_audit_entries {
}
return 1;
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -22,3 +22,9 @@ ad_page_contract_filter aa_test_category { name value } {
ad_complain "$value is not a valid acs-automated-testing testcase category"
return 0
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -198,9 +198,8 @@ proc http::config {args} {
proc http::Finish { token {errormsg ""} {skipCB 0}} {
variable $token
upvar 0 $token state
global errorInfo errorCode
if {[string length $errormsg] != 0} {
set state(error) [list $errormsg $errorInfo $errorCode]
set state(error) [list $errormsg $::errorInfo $::errorCode]
set state(status) error
}
if {[info exists state(connection)] && $state(connection) eq "close"} {
......@@ -210,7 +209,7 @@ proc http::Finish { token {errormsg ""} {skipCB 0}} {
if {[info exists state(-command)] && !$skipCB} {
if {[catch {eval $state(-command) {$token}} err]} {
if {$errormsg eq ""} {
set state(error) [list $err $errorInfo $errorCode]
set state(error) [list $err $::errorInfo $::errorCode]
set state(status) error
}
}
......@@ -362,9 +361,10 @@ proc http::geturl { url args } {
foreach {flag value} $args {
if {[regexp $pat $flag]} {
# Validate numbers
if {[info exists state($flag)] && \
[string is integer -strict $state($flag)] && \
![string is integer -strict $value]} {
if {[info exists state($flag)]
&& [string is integer -strict $state($flag)]
&& ![string is integer -strict $value]
} {
unset $token
return -code error "Bad value for $flag ($value), must be integer"
}
......@@ -713,7 +713,6 @@ proc http::cleanup {token} {
proc http::Connect {token} {
variable $token
upvar 0 $token state
global errorInfo errorCode
if {[eof $state(sock)] ||
[string length [fconfigure $state(sock) -error]]} {
Finish $token "connect failed [fconfigure $state(sock) -error]" 1
......@@ -844,17 +843,20 @@ proc http::Event {s token} {
# We have to use binary translation to count bytes properly.
fconfigure $s -translation binary
if {$state(-binary) || ![string match -nocase text* $state(type)]
|| [string match "*gzip*" $state(coding)]
|| [string match "*compress*" $state(coding)]} {
if {$state(-binary)
|| ![string match -nocase text* $state(type)]
|| [string match "*gzip*" $state(coding)]
|| [string match "*compress*" $state(coding)]
} {
# Turn off conversions for non-text data
set state(binary) 1
if {[info exists state(-channel)]} {
fconfigure $state(-channel) -translation binary
}
}
if {[info exists state(-channel)] && \
![info exists state(-handler)]} {
if {[info exists state(-channel)]
&& ![info exists state(-handler)]
} {
# Initiate a sequence of background fcopies
fileevent $s readable {}
CopyStart $s $token
......@@ -1151,8 +1153,9 @@ proc http::mapReply {string} {
proc http::ProxyRequired {host} {
variable http
if {[info exists http(-proxyhost)] && [string length $http(-proxyhost)]} {
if {![info exists http(-proxyport)] || \
$http(-proxyport) eq ""} {
if {![info exists http(-proxyport)]
|| $http(-proxyport) eq ""
} {
set http(-proxyport) 8080
}
return [list $http(-proxyhost) $http(-proxyport)]
......@@ -1198,3 +1201,9 @@ proc http::CharsetToEncoding {charset} {
return "binary"
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -121,3 +121,9 @@ proc Se {cmd args} {
}
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -57,8 +57,7 @@ ad_proc twt::do_request { page_url } {
# $retry_max times. Propagate the error while retaining the stack trace
aa_log "twt::do_request failed with error=\"$errmsg\" response_url=\"[tclwebtest::response url]\". See error log for the HTML response body"
ns_log Error "twt::do_request failed with error=\"$errmsg\" response_url=\"[tclwebtest::response url]\" response_body=\"[tclwebtest::response body]\""
global errorInfo
error $errmsg $errorInfo
error $errmsg $::errorInfo
}
}
......@@ -208,3 +207,9 @@ ad_proc twt::user::logout {} {
} {
twt::do_request "[twt::server_url]/register/logout"
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -32,3 +32,9 @@ aa_register_case -cats {web smoke} -libraries tclwebtest tclwebtest_example {
twt::user::delete -user_id $user_id
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -11,4 +11,9 @@ aa_register_case \
aa_log $errmsg
aa_false "Open [ad_url]" [catch {Se open [ad_url]} errmsg]
aa_log $errmsg
}
\ No newline at end of file
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -17,3 +17,9 @@ db_dml delete_testcase_tests_sql $sql
ad_returnredirect "index"
ad_returnredirect "index?by_package_key=$package_key&by_category=$category&view_by=$view_by&quiet=$quiet"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -24,3 +24,9 @@ foreach component [nsv_get aa_test components] {
}
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -114,8 +114,9 @@ if {$view_by eq "package"} {
# - The package key is blank or it matches the specified.
# - The category is blank or it matches the specified.
#
if {($by_package_key eq "" || ($by_package_key eq $package_key)) && \
($by_category eq "" || ([lsearch $categories $by_category] != -1))} {
if {($by_package_key eq "" || ($by_package_key eq $package_key))
&& ($by_category eq "" || ($by_category in $categories))
} {
# Swap the highlight flag between packages.
if {$old_package_key ne $package_key} {
set marker 1
......@@ -152,3 +153,9 @@ foreach category [nsv_get aa_test categories] {
set record_url [export_vars -base "record-test" -url {{return_url [ad_return_url]} package_key}]
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -14,3 +14,9 @@ ns_log Notice "Sourcing test definition file $absolute_file_path"
apm_source $absolute_file_path
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -34,4 +34,9 @@ foreach proc_name $all_proc_names {
}
}
set uncovered_procs [join $uncovered_procs "<br>"]
\ No newline at end of file
set uncovered_procs [join $uncovered_procs "<br>"]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -200,4 +200,9 @@ aa_register_case \
}
ad_return_template
\ No newline at end of file
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
ad_page_contract {
@cvs-id $Id$
} {
{package_key ""}
{package_key:token ""}
{category:aa_test_category ""}
{view_by:aa_test_view_by "package"}
{testcase_id:naturalnum,notnull ""}
{testcase_id:word,notnull ""}
{quiet:boolean "0"}
{stress:boolean "0"}
{security_risk:boolean "0"}
......@@ -12,18 +12,28 @@ ad_page_contract {
}
if {$testcase_id eq ""} {
if {$quiet} {
aa_runseries -stress $stress -security_risk $security_risk -quiet $package_key $category
} else {
aa_runseries -stress $stress -security_risk $security_risk $package_key $category
}
ad_returnredirect "index?by_package_key=$package_key&by_category=$category&view_by=$view_by&quiet=$quiet&stress=$stress&security_risk=$security_risk"
if {$quiet} {
aa_runseries -stress $stress -security_risk $security_risk -quiet $package_key $category
} else {
aa_runseries -stress $stress -security_risk $security_risk $package_key $category
}
ad_returnredirect [export_vars -base index {
{by_package_key $package_key}
{by_category $category}
view_by quiet stress security_risk}]
} else {
if {$quiet} {
aa_runseries -quiet -testcase_id $testcase_id "" ""
} else {
aa_runseries -testcase_id $testcase_id "" ""
}
ad_returnredirect "testcase?testcase_id=$testcase_id&package_key=$package_key&quiet=$quiet"
if {$quiet} {
aa_runseries -quiet -testcase_id $testcase_id "" ""
} else {
aa_runseries -testcase_id $testcase_id "" ""
}
ad_returnredirect "testcase?testcase_id=$testcase_id&package_key=$package_key&quiet=$quiet"
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
ad_page_contract {
@cvs-id $Id$
} {
testcase_id:naturalnum,notnull
package_key:nohtml
testcase_id:word,notnull
package_key:token
{showsource:boolean 0}
{quiet:boolean 1}
} -properties {
......@@ -130,3 +130,9 @@ th {
"
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -2,28 +2,11 @@
<property name="context">{/doc/acs-automated-testing {Automated Testing}} {Automated Testing}</property>
<property name="doc(title)">Automated Testing</property>
<master>
<body>
<div class="navheader">
<table width="100%" summary="Navigation header" border="0"><tr>
<td width="20%" align="left"></td><th width="60%" align="center"></th><td width="20%" align="right"><a accesskey="n" href="install">Next</a></td>
</tr></table><hr>
</div><div class="article" lang="en">
<div class="titlepage">
<div><div><h2 class="title">
<a name="acs-automated-testing"></a>Automated Testing</h2></div></div><div></div><hr>
</div><div class="toc">
<p><b>Table of Contents</b></p><dl>
<div class="article" lang="en">
<div class="titlepage"><h1 class="title">Automated Testing</h1></div><dl>
<dt><span class="sect1"><a href="install">Installation</a></span></dt><dt><span class="sect1"><a href="usage">Usage</a></span></dt><dt><span class="sect1"><a href="requirements">Requirements</a></span></dt>
</dl>
</div>
</div><div class="navfooter">
<hr><table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"></td><td width="20%" align="center"></td><td width="40%" align="right"><a accesskey="n" href="install">Next</a></td>
</tr><tr>
<td width="40%" align="left"></td><td width="20%" align="center"></td><td width="40%" align="right"> Installation</td>
</tr>
</table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address>
</div><a name="comments"></a><center><a href="http://openacs.org/doc/index.html#comments">View comments on this page at openacs.org</a></center>
</body>
<h2>Release Notes</h2>
<p>Please file bugs in the <a href="http://openacs.org/bugtracker/openacs/">Bug Tracker</a>.</p>
<address><a href="mailto:docs\@openacs.org">docs\@openacs.org</a></address>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Automated Testing</title><meta name="generator" content="DocBook XSL Stylesheets V1.64.1"><link rel="home" href="index.html" title="Automated Testing"><link rel="next" href="install.html" title="Installation"><link rel="stylesheet" href="openacs.css" type="text/css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><a href="http://openacs.org"><img src="/doc/images/alex.jpg" border="0" alt="Alex logo"></a><table width="100%" summary="Navigation header" border="0"><tr><td width="20%" align="left"> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="install.html">Next</a></td></tr></table><hr></div><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="acs-automated-testing"></a>Automated Testing</h2></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="install.html">Installation</a></span></dt><dt><span class="sect1"><a href="usage.html">Usage</a></span></dt><dt><span class="sect1"><a href="requirements.html">Requirements</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"></td><td width="40%" align="right"> <a accesskey="n" href="install.html">Next</a></td></tr><tr><td width="40%" align="left"> </td><td width="20%" align="center"></td><td width="40%" align="right"> Installation</td></tr></table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address></div><a name="comments"></a><center><a href="http://openacs.org/doc/index.html#comments">View comments on this page at openacs.org</a></center></body></html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.15), see www.w3.org">
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii">
<title>Automated Testing</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.64.1">
<link rel="stylesheet" href="openacs.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084"
alink="#0000FF">
<div class="article" lang="en">
<div class="titlepage">
<h1 class="title">Automated Testing</h1>
</div>
<dl>
<dt><span class="sect1"><a href=
"install.html">Installation</a></span></dt>
<dt><span class="sect1"><a href="usage.html">Usage</a></span></dt>
<dt><span class="sect1"><a href=
"requirements.html">Requirements</a></span></dt>
</dl>
</div>
<h2>Release Notes</h2>
<p>Please file bugs in the <a href="http://openacs.org/bugtracker/openacs/">Bug Tracker</a>.</p>
<address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address>
</div>
</body>
</html>
......@@ -2,31 +2,24 @@
<property name="context">{/doc/acs-automated-testing {Automated Testing}} {Installation}</property>
<property name="doc(title)">Installation</property>
<master>
<body>
<div class="navheader">
<table width="100%" summary="Navigation header" border="0"><tr>
<td width="20%" align="left"><a accesskey="p" href="index">Prev</a></td><th width="60%" align="center"></th><td width="20%" align="right"><a accesskey="n" href="usage">Next</a></td>
</tr></table><hr>
</div><div class="sect1" lang="en">
<div class="titlepage">
<div><div><h2 class="title" style="clear: both">
<a name="install"></a>Installation</h2></div></div><div></div>
</div><div class="authorblurb">
<p>
by <a href="mailto:joel@aufrecht.org" target="_top">Joel Aufrecht</a>
<include src="/packages/acs-core-docs/lib/navheader"
leftLink="index" leftLabel="Prev"
title=""
rightLink="usage" rightLabel="Next">
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="install" id="install"></a>Installation</h2></div></div></div><div class="authorblurb">
<p>by <a href="mailto:joel\@aufrecht.org" target="_top">Joel
Aufrecht</a>
</p>
OpenACS docs are written by the named authors, and may be edited
by OpenACS documentation staff.
</div><p>Automated Testing is part of acs-core, and therefore should already be installed in any OpenACS system. Individual automated tests are stored within each package in package/tcl/test.
</p>
</div><div class="navfooter">
<hr><table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="index">Prev</a></td><td width="20%" align="center"><a accesskey="h" href="index">Home</a></td><td width="40%" align="right"><a accesskey="n" href="usage">Next</a></td>
</tr><tr>
<td width="40%" align="left">Automated Testing </td><td width="20%" align="center"><a accesskey="u" href="index">Up</a></td><td width="40%" align="right"> Usage</td>
</tr>
</table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address>
</div><a name="comments"></a><center><a href="http://openacs.org/doc/install.html#comments">View comments on this page at openacs.org</a></center>
</body>
OpenACS docs are written by the named authors, and may be edited by
OpenACS documentation staff.</div><p>Automated Testing is part of acs-core, and therefore should
already be installed in any OpenACS system. Individual automated
tests are stored within each package in package/tcl/test.</p>
</div>
<include src="/packages/acs-core-docs/lib/navfooter"
leftLink="index" leftLabel="Prev" leftTitle="Automated Testing"
rightLink="usage" rightLabel="Next" rightTitle="Usage"
homeLink="index" homeLabel="Home"
upLink="index" upLabel="Up">
\ No newline at end of file
This diff is collapsed.
......@@ -2,32 +2,41 @@
<property name="context">{/doc/acs-automated-testing {Automated Testing}} {Usage}</property>
<property name="doc(title)">Usage</property>
<master>
<body>
<div class="navheader">
<table width="100%" summary="Navigation header" border="0"><tr>
<td width="20%" align="left"><a accesskey="p" href="install">Prev</a></td><th width="60%" align="center"></th><td width="20%" align="right"><a accesskey="n" href="requirements">Next</a></td>
</tr></table><hr>
</div><div class="sect1" lang="en">
<div class="titlepage">
<div><div><h2 class="title" style="clear: both">
<a name="usage"></a>Usage</h2></div></div><div></div>
</div><div class="authorblurb">
<p>by <a href="mailto:joel@aufrecht.org" target="_top">Joel Aufrecht</a>
<include src="/packages/acs-core-docs/lib/navheader"
leftLink="install" leftLabel="Prev"
title=""
rightLink="requirements" rightLabel="Next">
<div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="usage" id="usage"></a>Usage</h2></div></div></div><div class="authorblurb">
<p>by <a href="mailto:joel\@aufrecht.org" target="_top">Joel
Aufrecht</a>
</p>
OpenACS docs are written by the named authors, and may be edited
by OpenACS documentation staff.
</div><p>Here's the entire chain of code used to set up auto-rebuilding servers on test.openacs.org</p><div class="itemizedlist"><ul type="disc">
OpenACS docs are written by the named authors, and may be edited by
OpenACS documentation staff.</div><p>Here's the entire chain of code used to set up auto-rebuilding
servers on test.openacs.org</p><div class="itemizedlist"><ul type="disc">
<li>
<p>The master server shows the status of all other servers. For test.openacs.org, it listens on port 80.</p><div class="orderedlist"><ol type="1">
<li><p>The acs-automated-testing parameter <tt class="computeroutput">IsInstallReportServer</tt> is set to 1</p></li><li><p>The acs-automated-testing parameter <tt class="computeroutput">XMLReportDir</tt> is set to <tt class="computeroutput">/var/log/openacs-install</tt>. This is arbitrary - it just needs to be somewhere all the servers can write to.</p></li>
<p>The master server shows the status of all other servers. For
test.openacs.org, it listens on port 80.</p><div class="orderedlist"><ol type="1">
<li><p>The acs-automated-testing parameter <tt class="computeroutput">IsInstallReportServer</tt> is set to 1</p></li><li><p>The acs-automated-testing parameter <tt class="computeroutput">XMLReportDir</tt> is set to <tt class="computeroutput">/var/log/openacs-install</tt>. This is arbitrary -
it just needs to be somewhere all the servers can write to.</p></li>
</ol></div>
</li><li>
<p>For each server that will be monitored:</p><div class="orderedlist"><ol type="1">
<li><p>Suppose the first test server is <span class="replaceable"><span class="replaceable">service1</span></span>. Set up a dedicated user and <a href="http://openacs.org/doc/openacs-5-0-0/openacs.html#install-with-script" target="_top">automated install script</a>.</p></li><li>
<p>To run automated testing automatically each time the server is rebuilt, add this to /home/service1/install/install.tcl:</p><pre class="programlisting"> set do_tclapi_testing "yes"</pre>
<li><p>Suppose the first test server is <span class="replaceable"><span class="replaceable">service1</span></span>. Set
up a dedicated user and <a href="http://openacs.org/doc/openacs-5-0-0/openacs.html#install-with-script" target="_top">automated install script</a>.</p></li><li>
<p>To run automated testing automatically each time the server is
rebuilt, add this to /home/service1/install/install.tcl:</p><pre class="programlisting">
set do_tclapi_testing "yes"
</pre>
</li><li>
<p>Get the results of the automated tests dumped where the master server can see them - in this example, the same directory as above, <tt class="computeroutput">/var/log/openacs-install</tt>, by adding this to install.tcl (requires 5.1):</p><pre class="programlisting"> set install_xml_file "/var/lib/aolserver/service0/packages/acs-core-docs/www/files/install-autotest.xml"</pre><p>This will copy in the file <tt class="computeroutput">install-autotest.xml</tt>:</p><pre class="programlisting">&lt;?xml version="1.0"?&gt;
<p>Get the results of the automated tests dumped where the master
server can see them - in this example, the same directory as above,
<tt class="computeroutput">/var/log/openacs-install</tt>, by adding
this to install.tcl (requires 5.1):</p><pre class="programlisting">
set install_xml_file "/var/lib/aolserver/service0/packages/acs-core-docs/www/files/install-autotest.xml"
</pre><p>This will copy in the file <tt class="computeroutput">install-autotest.xml</tt>:</p><pre class="programlisting">
&lt;?xml version="1.0"?&gt;
&lt;!-- This is an install.xml which can be used to configure servers for reporting their automated test results. Requires acs-automated-testing 5.1.0b2 or better --&gt;
......@@ -39,11 +48,14 @@
&lt;/actions&gt;
&lt;/application&gt;
</pre><p>which will, during install, configure that parameter in acs-automated-testing on the monitored server.</p>
</pre><p>which will, during install, configure that parameter in
acs-automated-testing on the monitored server.</p>
</li>
</ol></div>
</li><li>
<p>To enable the 'rebuild server' link, edit the file /usr/local/bin/rebuild-server.sh:</p><pre class="programlisting">#!/bin/sh
<p>To enable the 'rebuild server' link, edit the file
/usr/local/bin/rebuild-server.sh:</p><pre class="programlisting">
#!/bin/sh
# script to trigger a server rebuild
# hard-coding the valid server names here for some minimal security
......@@ -55,16 +67,18 @@ case $1 in
exit;;
esac
sudo /home/$1/install/install.sh 2&gt;&amp;1</pre><p>and allow the <tt class="computeroutput">master</tt> user to execute this file as root (this is a limitation of the automatic install script, which must be root). In <tt class="computeroutput">/etc/sudoers</tt>, include a line:</p><pre class="programlisting">master ALL = NOPASSWD: /usr/local/bin/rebuild-server.sh</pre>
sudo /home/$1/install/install.sh 2&gt;&amp;1
</pre><p>and allow the <tt class="computeroutput">master</tt> user to
execute this file as root (this is a limitation of the automatic
install script, which must be root). In <tt class="computeroutput">/etc/sudoers</tt>, include a line:</p><pre class="programlisting">
master ALL = NOPASSWD: /usr/local/bin/rebuild-server.sh
</pre>
</li>
</ul></div>
</div><div class="navfooter">
<hr><table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="install">Prev</a></td><td width="20%" align="center"><a accesskey="h" href="index">Home</a></td><td width="40%" align="right"><a accesskey="n" href="requirements">Next</a></td>
</tr><tr>
<td width="40%" align="left">Installation </td><td width="20%" align="center"><a accesskey="u" href="index">Up</a></td><td width="40%" align="right"> Requirements</td>
</tr>
</table><hr><address><a href="mailto:docs@openacs.org">docs@openacs.org</a></address>
</div><a name="comments"></a><center><a href="http://openacs.org/doc/usage.html#comments">View comments on this page at openacs.org</a></center>
</body>
</div>
<include src="/packages/acs-core-docs/lib/navfooter"
leftLink="install" leftLabel="Prev" leftTitle="Installation"
rightLink="requirements" rightLabel="Next" rightTitle="Requirements"
homeLink="index" homeLabel="Home"
upLink="index" upLabel="Up">
\ No newline at end of file
......@@ -39,3 +39,9 @@ if { $xml_report_dir ne "" } {
$service(parse_errors)
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -9,3 +9,9 @@ exec sudo /usr/local/bin/rebuild-server.sh $server >& /web/master/www/rebuild-$s
ad_returnredirect /rebuild-$server.log
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -29,3 +29,9 @@ set admin_login_url [export_vars -base "$service(url)/register/auto-login" {{ema
set rebuild_url [export_vars -base rebuild-server { { server $service(name) } }]
set rebuild_log_url "/rebuild-$service(name).log"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment