Adding scripts to sites

philmcdonnell

Verified User
Joined
Jan 6, 2004
Messages
184
Location
New York
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
 
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.
 
S2S-Robert said:
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
 
philmcdonnell said:
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

ProWebUK said:
You know me too well :D
;)
 
S2S-Robert said:
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
 
ProWebUK said:
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) ;)
 
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
 
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
 
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 ;)
 
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.
 
Last edited:
But right *now* the scripts are run as users, not root.. unless you want to +s the script.. (yeek!) ;)

John
 
yes, but user can access his own files and files from current skin, right? if yes, then that should be enough.
 
DirectAdmin Support said:
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
 
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?
 
S2S-Robert said:
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
 
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 :)
 
Yep. i just didnt think of chowing files anywhere using root to then be executed by that user... floated past me totally :D
 
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.
 
Back
Top