[rt-users] RT config files different instances

Ruslan Zakirov ruslan.zakirov at gmail.com
Sat Jul 14 16:15:47 EDT 2012


Even if you can make it work, there is no guaranty it will work acros
versions of RT. Do you use RT API for reporting?

Ruslan from phone.
14.07.2012 15:22 пользователь "Richard McMahon" <rgm at ast.cam.ac.uk> написал:

> Hello,
>
> I have a a few different RT instances and I am running reports
> remotely, see exampe code below.
>
> At the moment I have all the passwords in each report script but I would
> like to move the DB info and passwords to configuration files and specify
> the config files as command line options using Getopt::Long.
>
> I am considering using the perl module Config::Tiny to read
> the configuration information. Are there any other suggestions?
>
> e.g. should/can I uses RT's own configuration handler. If yes,
> where is a good place to start? Thiscwould also mean less
> extra Per modules needed. I will share the reporing scripts
> when I have finished.
>
> e.g this is what I do now:
>
> RT::LoadConfig();
>
> # set/change some Config values
> if host=host1) {
>   RT->Config->Set( DatabaseType => 'mysql' );
>   RT->Config->Set( DatabaseHost => 'host1.ast.cam.ac.uk' );
>   RT->Config->Set( DatabaseName => 'rt3' );
>   RT->Config->Set( DatabaseUser => 'rgm');
>   RT->Config->Set( DatabasePassword => 'NotaPassword');
>   RT->Config->Set( LogDir => '/home/rgm/soft/rt/host1/log/' );
> }
>
> if (host=host2) { }
>
> RT::Init();
>
> r.
>
>
> ------------------------------**------------------------------**-------
>  Dr. Richard G. McMahon    | Phone (office)     44-(0)-1223-337519
>  University of Cambridge   |       (switchboard)       1223-337548
>  Institute of Astronomy    |       (secretary)         1223-337516
>  Madingley Rd              | FAX                       1223-337523
>  Cambridge, CB3 OHA, UK.   | mobile                    7885-409019
>  Office: Hoyle 18          | home                      1223-359770
> ------------------------------**------------------------------**-------
>  email: rgm at ast.cam.ac.uk  | WWW:    http://www.ast.cam.ac.uk/~rgm
>  richardgmcmahon at gmail.com | skype:                richardgmcmahon
> ------------------------------**------------------------------**-------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120714/3e92231c/attachment.htm>


More information about the rt-users mailing list