View Full Version : Installing a script (drupal) whose code base is shared among domains

11-06-2005, 11:20 PM
What I want to achieve?

I (using my admin or reseller account) want to install drupal for certain new users, but I want all of them to share the code base.

I am not sure if other plugins (installatron & easy site) achieve that.

What needs to be done in order to achieve this?

Well, there are 3 main steps:
1 - Install drupal in ONE directory. (Implies: this would be done only once)
2 - Create a sub-directory under "sites" directory in drupal. (Implies: this would be done once for each new domain)
3 - Point the apache Virtualhost to the drupal directory. (Implies: All virtualhosts will point to the same parent directory)

How can this be acieved using DirectAdmin?

Since I am using DirectAdmin, I was wondering if it would be hard to create a plugin that could do what I described above? I would much appreciate pointers in any direction :).



11-07-2005, 09:47 AM
Assuming that drupal was already setup, you could make the modifications using a shell script that would run after a domain is created. But there wouldn't be anything stopping the user from uploading files to the domain's directory in his/her home directory...

11-07-2005, 10:12 AM
Thanks jmstacey. That sounds like a good solution to our situation.

A quick question:

"modifications using a shell script that would run after a domain is created"
Can this shell script be executed only for certain users or user-plans?


PS: I don't think I need to worry about the users uploading new files - they are not going to have FTP acess.

11-07-2005, 11:45 AM
They can upload through the filemanager.

There are several variations that you can use, but yes, you could set it up in such a way that it would only do it according to certain criteria, although it depends on what that criteria is and where you would get it from.

11-07-2005, 12:38 PM
I am not going to be sending them their DirectAdmin information. As fas as they are concerned, they need Drupal setup and an account on it.

I found this: http://directadmin.com/forum/showthread.php?threadid=7054 topic.

Basically it says, I can add a block of code (in some signup shell script) that will be executed only if the user was created with a specific plan. This script is passed the current plan as a parameter by DirectAdmin. Could you please comment on the below:

Say, I add this code in the shell script:


if( plan == 'SpecialPlan') {

rm -r public_html
ln -s /usr/local/drupal public_thml
// Add drupal specifc configuration here


What do you think?