Hi folks,
I am using RT 4.0.6.
I wrote a plug-in which needs some variables to be set in the config file.
So I created a file
/opt/rt4/local/RTx-MYPLUGIN/etc/RT_SiteConfig.pm
It looks like that:
Set($MyVar, ‘SomeValue’);
1;
The plug-in is activated in /opt/rt4/etc/RT_SiteConfig.pm with
Set(@Plugins,(qw(RTx::MYPLUGIN)));
The plug-in works fine, but the config is being ignored.
So, I have two options.
-
Add the lines from /opt/rt4/local/RTx-MYPLUGIN/etc/RT_SiteConfig.pm to /opt/rt4/etc/RT_SiteConfig.pm
-
create a symlink
cd /opt/rt4/etc
ln -s /opt/rt4/local/plugins/RTx-MYPLUGIN/etc/RT_SiteConfig.pm MYPLUGIN_Config.pm
My questions are the following.
How can I rewrite the plug-in so that the config in local/plugin/RTx-MYPLUGIN/etc/RT_SiteConfig.pm will be used when I include the plug-in?
Where do I have to put this file?
What other options do I have besides 1) and 2)?
Thanks a lot for your help.
Greetings,
Alexander Reintzsch
Maybe the config filename must be unique.
Rename your config file in flocal/plugin/RTx-MYPLUGIN/etc/ from
RT_SiteConfig.pm to MYPLUGIN_Config.pm.
I never had problems with my solution. Take a look at:
-ChrisAm 23.05.2012 09:16, schrieb Alexander Reintzsch:
Hi folks,
I am using RT 4.0.6.
I wrote a plug-in which needs some variables to be set in the config file.
So I created a file
/opt/rt4/local/RTx-MYPLUGIN/etc/RT_SiteConfig.pm
It looks like that:
Set($MyVar, ‘SomeValue’);
1;
The plug-in is activated in /opt/rt4/etc/RT_SiteConfig.pm with
Set(@Plugins,(qw(RTx::MYPLUGIN)));
The plug-in works fine, but the config is being ignored.
So, I have two options.
-
Add the lines from /opt/rt4/local/RTx-MYPLUGIN/etc/RT_SiteConfig.pm to /opt/rt4/etc/RT_SiteConfig.pm
-
create a symlink
cd /opt/rt4/etc
ln -s /opt/rt4/local/plugins/RTx-MYPLUGIN/etc/RT_SiteConfig.pm MYPLUGIN_Config.pm
My questions are the following.
How can I rewrite the plug-in so that the config in local/plugin/RTx-MYPLUGIN/etc/RT_SiteConfig.pm will be used when I include the plug-in?
Where do I have to put this file?
What other options do I have besides 1) and 2)?
Thanks a lot for your help.
Greetings,
Christian Loos
Network Documentation & Fibre Management
NETCOLOGNE Gesellschaft für Telekommunikation mbH
Am Coloneum 9 | 50829 Köln
Tel: 0221 2222-276 | Fax: 0221 2222-7276 | Mobil: 0177 8888276
Geschäftsführer:
Dr. Hans Konle (Sprecher)
Dipl.-Ing. Karl-Heinz Zankel
Vorsitzender des Aufsichtsrates:
Dr. Andreas Cerbe
HRB 25580, AG Köln
Diese Nachricht (inklusive aller Anhänge) ist vertraulich. Sollten Sie diese Nachricht versehentlich erhalten haben, bitten wir, den Absender (durch Antwort-E-Mail) hiervon unverzüglich zu informieren und die Nachricht zu löschen. Die E-Mail darf in diesem Fall weder vervielfältigt noch in anderer Weise verwendet werden.
I am using RT 4.0.6.
I wrote a plug-in which needs some variables to be set in the config file.
So I created a file
/opt/rt4/local/RTx-MYPLUGIN/etc/RT_SiteConfig.pm
As Christian Loos pointed out, RT_SiteConfig.pm and RT_Config.pm are
treated as special names. If you want to do this, you should put your
plugin’s default config vars into etc/MyPlugin_Config.pm. This leaves
etc/MyPlugin_SiteConfig.pm for anyone who wants to use it over the main
RT_SiteConfig.pm.
Thomas