Ticket #260 (closed enhancement: invalid)

Opened 3 years ago

Last modified 3 years ago

Store path to database.cfg for the perl scripts in the DB

Reported by: Ed <maia@…> Owned by: rjl
Priority: lowest Milestone: 1.0.1
Component: Perl scripts Version: 1.0.0 RC5
Severity: minor Keywords:
Cc: Ed <maia@…>, Arnaud Launay <asl@…>

Description

Would it possibly be useful for others to change the configuration variable from "my $cfg" in each of the perl scripts to something set in the DB at $MAIA_URL/adminsystem.php. As it stands now, if the path is 'non-standard' 7 perl scripts have to be edited to set the correct location for database.cfg.

Having a configurable variable within the Maia GUI might be useful for others as well.

Change History

Changed 3 years ago by rjl

  • status changed from new to closed
  • resolution set to invalid

Nice idea, but how would the Perl scripts know how to connect to the database without having the information from database.cfg? :)

The trouble is that the Perl scripts need to know how to connect to the database in the first place, which is the whole point of having a database.cfg file. Without database.cfg, you'd need to set the database connection info at the top of every one of the Perl scripts, which saves you nothing, and in fact makes life more difficult for you if you ever change your database connection info. Keeping the database connection info in a central place (i.e. database.cfg) makes it easy to modify in the future without having to edit all of those Perl scripts later--they only need to be pointed to database.cfg once at install time.

Future versions may, however, include an Autoconf-style install script that would allow you to specify paths that get written into the Perl scripts for you at install time.

Changed 3 years ago by Ed <maia@…>

UGH...duh

Sorry 'bout that :/

The "autoconf" idea sounds nice though...

Changed 3 years ago by Arnaud Launay <asl@…>

I back the autoconf or whatever idea. For example, on gentoo, amavis gets installed in /var/amavis and NOT in /var/amavisd, thus for each new maia installation, I have to remember to modify the paths on each scripts, which is a real pain in the ass.

Changed 3 years ago by anonymous

  • cc Arnaud Launay <asl@…> added

Changed 3 years ago by rjl

  • version set to 1.0.0 RC5
  • milestone set to 1.0.1

This issue has been further resolved in Changesets 977-979, which remove the database.cfg file altogether. All configuration settings are now stored in a central /etc/maia.conf file, so there's no longer any need to configure anything in any of the Perl scripts themselves.

Note: See TracTickets for help on using tickets.