Forum OpenACS Q&A: Sample Parameters File?

Request notifications

Collapse
Posted by Carl Coryell-Martin on
Can someone post a link to a sample parameters file for a package that will allow me to override information in the parameters database.

There is lots of documentation that says that this is possible and I would really appreciate a sample of what a file needs to look like and where it should go.

Thanks so much,

Carl

Collapse
Posted by C. R. Oldham on

It should go in a directory called "parameters" in your server root directory (the one above the 'www' directory). It should be named the same as your servername, followed by an '.ini' extension.

Here's an example:

[ns/server/ncacasi/acs]
SystemName=NCA-CASI Network (C. R.'s install main)
; Debug the RP
DebugP=1
; Automatic Error Reporting
AutomaticErrorReportingP=1

[ns/server/ncacasi/acs/acs-developer-support]
; remember information about connections, for developers' benefit?
EnabledP=1
; Enabled on startup?
EnabledOnStartupP=1
; Enable switching users?
UserSwitchingEnabledP=0
; remember information about every database request?
DatabaseEnabledP=1
; remember information for which client hosts?
EnabledIPs=*
; remember this information for how long? sweep how often? (in seconds)
DataLifetime=900
DataSweepInterval=900
Collapse
Posted by Carl Coryell-Martin on
hmm, is there a way to tcl format it as well.

something like the old

ad_parameter ParameterName value

I really liked being able to do tcl scripting in my parameter files.

Collapse
Posted by Tom Jackson on

Look for a script ini2tcl.tcl in the aolserver source directory.

Collapse
Posted by Andrew Piskorski on
What? This thing looks just like the AOLserver config file, but apparently is not. What is it exactly, and what part of OpenACS uses it to "override information in the parameters database"?
Collapse
Posted by Raad Al-Rawi on
I was under the impression that an alternative way of specifying parameters was using a .info file for the package, and that this was deprecated anyway!

I for one would be very interested in other ways of doing this.

<Raad>

Collapse
Posted by Jade Rubick on
You're right, Raad. It can be done through the APM interface. Someone needs to write up docs for this, or put it in the tutorial
Collapse
Posted by Randy O'Meara on
The following must also be added to your service startup config.tcl.

Under section:
    ns_section ns/parameters

Add entry:
    ns_param  auxconfigdir      ${serverroot}/parameters

Why am I mucking around with this? The parameter-override (this) mechanism is the only way I've found to set the "DefaultMaster" parameter of acs-subsite so that all subsequently created subsites pickup this value automatically.

It's a little odd (I think) that when I use the "install.xml" mechanism to set the acs-subsite DefaultMaster parameter, it doesn't cause new subsites to use the defined value. However, install.xml does work as expected when setting parameters of an 'instance' of acs-subsite. Very subtle...

Randy

Collapse
Posted by Randy O'Meara on
This override.ini functionality was removed from aolserver 4.

The answer in AS4 is to convert the .ini to .tcl and source the file from you serviceN.tcl startup script. This can be accomplished with ini2tcl.tcl found in the aolserver source distribution.

Ref: http://www.mail-archive.com/aolserver@listserv.aol.com/msg06585.html