PDA

View Full Version : Adding scripts to sites


philmcdonnell
01-12-2004, 07:57 PM
Is there anyway to build into DA the ability to allow users to install scripts for their domains? Kind of like fantastico or the way cPanel allows you to install phpBB, etc...

Regards,
Phil

S2S-Robert
01-12-2004, 11:02 PM
Chris would refer to this as "keep DA pointless feature free" :D

It's not widely used and although imho kinda nice there are a lot more pressing matters to be dealt with (such as complete server backup) that I doubt it will be in the near future.

But setting those up can be real easy, you could have a complete working forum including database ready to go and when the time comes you just change the DB name and upload it all.

philmcdonnell
01-13-2004, 05:02 AM
Originally posted by S2S-Robert
But setting those up can be real easy, you could have a complete working forum including database ready to go and when the time comes you just change the DB name and upload it all.

Could you explain this a little more? I am not sure I understand what you mean?

Phil

ProWebUK
01-13-2004, 05:03 AM
Originally posted by S2S-Robert
Chris would refer to this as "keep DA pointless feature free" :D

You know me too well :D

S2S-Robert
01-13-2004, 09:20 AM
Originally posted by philmcdonnell
Could you explain this a little more? I am not sure I understand what you mean?

Phil Have you ever set up forums before?

You can just set up a forum, export the database of the default forum to an *.sql file and reimport that one back to the database in question. Then you upload all the files required for the forum and you're set. You could even have a tar file laying around to speed it up, the only thing you need to do is chown the files when you decompressed them :)

Or you could ask our house programmer ;) l0rdphi1. It would actually be quite easy for a shell scripter (which I'm not). The only thing you need to do is know the DA username, database name, database user & pass and it could automatically be extracted / chowned / mysql imported / config.php edited.

Come to think of it... That's actually quite nice to have laying around :D

Originally posted by ProWebUK
You know me too well :D ;)

ProWebUK
01-13-2004, 11:53 AM
Originally posted by S2S-Robert
Have you ever set up forums before?

You can just set up a forum, export the database of the default forum to an *.sql file and reimport that one back to the database in question. Then you upload all the files required for the forum and you're set. You could even have a tar file laying around to speed it up, the only thing you need to do is chown the files when you decompressed them :)

Or you could ask our house programmer ;) l0rdphi1. It would actually be quite easy for a shell scripter (which I'm not). The only thing you need to do is know the DA username, database name, database user & pass and it could automatically be extracted / chowned / mysql imported / config.php edited.

Come to think of it... That's actually quite nice to have laying around :D

;)

Its been mentioned before... It would be *very* easy to do.... the most difficult part being to get it setup in the panel or at all accessable via the web safely. To store a package on your server then get a shell script that will copy it somewhere then unpack it and write up your config is the easy part ;)

If we could get a special token setup that would execute a script with dynamic variables i would possibly give this project a go.

Chris

l0rdphi1
01-13-2004, 12:24 PM
Originally posted by ProWebUK
If we could get a special token setup that would execute a script with dynamic variables i would possibly give this project a go.
I suppose this is what you mean, but I would *love* to see an easy way to add menu items to DA (i.e., no skin editing) ;)

ProWebUK
01-13-2004, 12:30 PM
certainly would be nice to see a way where we could add tokens that would execute a script as root then pass the output from the script back to the page without anything that the user has access to running as root ;)

Chris

l0rdphi1
01-13-2004, 12:34 PM
Yeah :D

DirectAdmin Support
01-14-2004, 10:47 AM
So... kind of like the custom scripts for user creation.. but for users. Would need a pre-defined list of scripts (in a file somewhere) ... and they'd just select the script they want... and then it would be run, and DA would pass all the required env. variables, as well as any GET/POST values, so you can use forms with it... I'm thinking of a whole system, where the script produces a list of variables/types it wants that DA can parse, then DA will automagically create a form for it, and pass those values back once it's been posted.. or something like that. Perhaps DA could just call the script with "script.sh form" and the script would produce all required form html to be displayed.. might be easier that way... Thoughts?

John

ProWebUK
01-14-2004, 10:55 AM
We basically need a way to add forms into DA and get root privilges to move things around... we can add our own forms to skins, what we cant do is submit that form to execute a shell script as root or infact anything at the moment ;)

CyberAlien
01-14-2004, 11:11 AM
There are new features that have been added to skins in 1.206 that allowes to build something like that. And i'm already working on it. First beta should be ready soon. For beginning it will allow to install only phpBB, then i will add more scripts.

DirectAdmin Support
01-14-2004, 11:29 AM
But right *now* the scripts are run as users, not root.. unless you want to +s the script.. (yeek!) ;)

John

CyberAlien
01-14-2004, 11:32 AM
yes, but user can access his own files and files from current skin, right? if yes, then that should be enough.

ProWebUK
01-14-2004, 11:35 AM
Originally posted by DirectAdmin Support
But right *now* the scripts are run as users, not root.. unless you want to +s the script.. (yeek!) ;)

John

Mentioned in one of the earlier post nothing executed as root should be accessable via the web. which is the reason to get something behind DA running as root without anything in the actual interface........ once the shell script is executed that can move the script, untar the script, write the config, set the chown and chmod on all files - job done.... the part we cant do is get a shell script executed by / through DA as root :p

Chris

S2S-Robert
01-14-2004, 04:22 PM
Why do you exactly need root? Can't you just create a directory on the server which is server-wide readible (777) and the sysadmin would upload the necesarry files there.

The script would then be run as a user, chown / permissions are automatically set correctly and the user will just unpack the forum tar and edit the config.php. For a forum it would only need a pre existing MySQL database right?

ProWebUK
01-14-2004, 04:38 PM
Originally posted by S2S-Robert
Why do you exactly need root? Can't you just create a directory on the server which is server-wide readible (777) and the sysadmin would upload the necesarry files there.

The script would then be run as a user, chown / permissions are automatically set correctly and the user will just unpack the forum tar and edit the config.php. For a forum it would only need a pre existing MySQL database right?

You have an idea.. not exactly how I would work it.... but it sparked an idea.. another idea! :D ... i guess we can have a special username setup for it....... Just need to DA intergration for it to work....

I will try out a command line script for now just to test things out ;)

Chris

l0rdphi1
01-14-2004, 05:05 PM
Personally, I think this feature is already far more complicated than it has to be :) Just need a way to plug-in to DA's token/page system as the current user. That's all :)

ProWebUK
01-14-2004, 06:45 PM
Yep. i just didnt think of chowing files anywhere using root to then be executed by that user... floated past me totally :D

ProHS
02-04-2004, 11:11 PM
Yea i agree with not having script installer like CPanel but if someone wants to make a skin to do then that is kool. There is no need for extra features in DirectAdmin like that which is a waste of space if the admins/resellers do not use it.

malin
03-03-2004, 10:49 PM
I am new to the direct admin but ive noticed that the newest fad is this fantasico for novice users on a shared box.
Its easy to install all of the scripts in fantastico (just go to the web site and read the install files) But lets get realistic, a lot of people are data base illiterate and they want and NEED a feature like this to set up to auto install and run scripts.
Im in this business to attract new customers and 90 percent of my customers ask if i have cpanel/fantastico installed on the server or they wont buy it and theyll find a host that has it installed.
I feel that it is extreamly important to get this feature up and developed.
Ive been looking for an affordable control panel and im ready to invest in direct admin and i would like to tell everyone working on this project what a great job their doing and to keep it up.
:D

ProWebUK
03-04-2004, 08:51 AM
John, not sure if this suggestion would work although:

New Token:

|execute_script_query=query|

that simply executes:

/usr/local/direadmin/scripts/execute_script/execute.sh query

as root....

execute.sh can contain 1 script (if thats all you wanted) or you could use the query to allow as many features you wanted based on a case statement..

running root may not be the best thing, but it should be ok if its a set query (simply run that 1 script only and chown all files it moves?)

Chris

Eagle1
03-17-2004, 06:10 PM
Or you could go here (http://www.directadmin.com/forum/showthread.php?s=&threadid=2382).

ProWebUK
03-17-2004, 08:01 PM
The last post in this thread (besides yours) was actually before that thread was made...