[rt-users] HowTo or FAQ on creating scrips?
Bruce Campbell
bruce_campbell at ripe.net
Mon Feb 4 06:56:25 EST 2002
On Mon, 4 Feb 2002, Scott A. McIntyre wrote:
> I've seen a number of people asking how to create new Scrips, new
> Actions, etc, and there's been various mentions of putting the perl
> module in the right place, and then modifying the database accordingly,
> but try as I might, I haven't yet seen a FAQ or HowTo on this (or, for
> that matter, an answer...)
'You put the perl module in the right place, and update the database
accordingly'.
Theres a fair bit of hints and tips over in rt-devel regarding various
Scrips. The things you need are:
reading of man pages perlboot, perltoot, perltootc, perlobj,
perlbot, perlmod, perlmodlib, perlmodinstall. (Go read them,
really, they explain a lot)
Reading of the RT::Condition::Generic and RT::Action::Generic
modules (lib/RT/Condition/Generic.pm and lib/RT/Action/Generic.pm)
Understanding what is the 'right' place for the modules:
ScripConditions go in lib/RT/Condition/
ScripActions go in lib/RT/Action/
Understanding how ScripConditions and ScripActions are loaded:
The SQL tables ScripConditions and ScripActions define
an 'ExecModule' which is used as the RT::Condition::blah
or RT::Action::blah 'require'd in
lib/RT/ScripCondition.pm's LoadCondition() and
lib/RT/ScripAction.pm's LoadAction() methods.
Understanding how to insert ScripConditions and ScripActions into
the database:
Copy someone else's 'insert_condition_blah.pl' or
'insert_action_blah.pl', see
http://www.fsck.com/pub/rt/contrib/2.0, and change as
appropriate.
> I've trawled through the archives, but haven't seen anything jump out at
> me. If someone has a reference to the steps one needs to go through to
> add any of the add-ons, or our own Scrips/Actions/Conditions, it would
> be most handy.
The above is a quick list. If you like, I can do up a quick (but in
detail) commentary on steps need to create your own
Scrip{Condition,Action} and put it into place. ( I've got something else
underway for work, so I can provide a walk-thru for that ).
Regards,
--
Bruce Campbell RIPE
Systems/Network Engineer NCC
www.ripe.net - PGP562C8B1B Operations
More information about the rt-users
mailing list