Re: [webmin-devel] creating a database and random user/pass on module install

Tim Allingham <[email protected]> Tue, 07 Jul 2009 16:10:04 +1000
Newsgroups gmane.comp.web.webmin.devel
Message-ID <[email protected]>
Hi Jamie,

potentially quite a bit, as when the user has the statistics module
enabled, doesn't take long at all to generate a few thousand rows, and
after a few weeks into the 100K plus

Yeah looks like the best solution will be to disable the user interface
till setup, and include the config in admin page as a first-run type
output up front.

One other question, as the dev docs still seem to be down unfortunately.

What setting can be used in the webmin_links sub to enforce a link to
only be visible to the root user? It seems to be escaping me at the
moment :)

Cheers

Tim

-----Original Message-----
From: Jamie Cameron <[email protected]>
Reply-to: Webmin development list <[email protected]>
To: Webmin development list <[email protected]>
Subject: Re: [webmin-devel] creating a database and random user/pass on
module install
Date: Mon, 6 Jul 2009 22:44:11 -0700


Hi Tim,

How much data will your module be storing in this DB? If it isn't  
large, you may want to look into using text files instead of a database.

This is what Webmin / Virtualmin does, specifically to avoid the  
problem of setting up dependencies like MySQL.

However, if you really want to use a database, prompting the user the  
first time the module is accessed seems reasonable. You could call the  
mysql Webmin module to create the user and database.

  - Jamie


On Jul 6, 2009, at 9:12 PM, Tim Allingham <[email protected]> wrote:

> Hi All,
>
> I'm currently working on a virtualmin/webmin module that works off a  
> MySQL backend, and am trying to work out how to automate the  
> following during the module install
>
> 1) Create a database - name can be static in this case, though  
> either static or random will be fine
>
> 2) Import a MySQL dump to the database
>
> 3) Set up a user with random username and password, and return these  
> details to the script
>
> The database is universal, not domain specific for virtualmin, so I  
> don't believe its something to be handled by the feature_setup sub  
> in virtual_feature.pl.
>
>
> Is this something that is possible to achieve, or should I include  
> an install.cgi page that is called if no database details found, for  
> the setup to be run initially?
>
> Cheers
>
> Tim Allingham
> --- 
> --- 
> --- 
> ---------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited  
> time,
> vendors submitting new applications to BlackBerry App World(TM) will  
> have
> the opportunity to enter the BlackBerry Developer Challenge. See  
> full prize
> details at: http://p.sf.net/sfu/blackberry
> -
> Forwarded by the Webmin development list at [email protected]
> To remove yourself from this list, go to
> http://lists.sourceforge.net/lists/listinfo/webadmin-devel

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry

-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel