Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#260 closed enhancement (invalid)

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@…>


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 (5)

comment:1 Changed 15 years ago by rjl

  • Resolution set to invalid
  • Status changed from new to closed

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.

comment:2 Changed 15 years ago by Ed <maia@…>


Sorry 'bout that :/

The "autoconf" idea sounds nice though...

comment:3 Changed 15 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.

comment:4 Changed 15 years ago by anonymous

  • Cc Arnaud Launay <asl@…> added

comment:5 Changed 15 years ago by rjl

  • Milestone set to 1.0.1
  • Version set to 1.0.0 RC5

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.