[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Placing mysql install script (webapps-common with dbconfig-common)



hi jan,

On Thursday 24 May 2007 09:43, Jan-Pascal van Best wrote:
> 
> /usr/share/dbconfig-common/data/<packagename>/install/mysql
> but now it is
> /usr/share/dbconfig-common/data/<WC_INSTANCE>/install/mysql
> where WC_INSTANCE is something like =global=/phpesp or whereever the user

eek, that's actually an unintended sideeffect.  i wonder why i didn't see it 
in my testing...  there's probably going to be a few more like this too.  

for configuration-related stuff the layout should be something like 
package/instance/configfile, but for the bootstrapping sql and other
instance-independant info, the instance shouldn't be appended at all.

> has configured the webapp to be living. I understand something like this
> is necessary in order to support multiple instances of the same app
> running on a server. My question is, how do I (in the postinst script)
> find out WC_INSTANCE?

currently there isn't an easy way, though i agree there ought to be.  it'd 
help to have a picture of some of the use cases for it, so i don't go 
designing a tool that meets the wrong needs... 

> Another reason this is needed is that phpesp needs to know its base URL,
> or actually, the 'website_subdirectory' question asked during package
> configuration. There are several scripts in several locations that link to
> each other with <a href=...> tags in the generated html. The protocol and
> hostname parts can be determined dynamically, but the base directory
> cannot (without storing the location of each script in the scripts
> themselves). So now I use
> WC_DIRECTORY="`echo $WC_INSTANCE | cut -sd/ -f2- | sed -e 's,^/,,'`"
> to strip off the host part and get to the website subdirectory. Maybe
> that's not the nicest way to get to the subdirectory either - is there a
> better way?

i think we may need a webapps-common tool like the dbconfig-generate-include 
tool from dbconfig-common... 


	sean

Attachment: pgpPAVBpHmCiB.pgp
Description: PGP signature


Reply to: