ISPsystem.com Forums

ISPsystem.com Forums (http://forum.ispsystem.com//index.php)
-   Scripting / API (http://forum.ispsystem.com//forumdisplay.php?f=13)
-   -   Automated site creation (http://forum.ispsystem.com//showthread.php?t=1019)

mentaldirector 04-26-2010 08:37 PM

Automated site creation
 
Hi,

I want to create a shell script, which will create www domain, database and user, and copy some standard scripts below www directory.

Do you have such a sample?

I wasn't able to find domain / db creation in the API.

Thank you for this great software... :rolleyes:

mentaldirector 04-26-2010 11:21 PM

Ok, I've found the answer :)

/usr/local/ispmgr/sbin/mgrctl wwwdomain.edit domain=test.com alias=www.test.com

owner=username php=phpmod sok=yes ip=x.x.x.x admin=test@test.com

charset=utf8 cgi=on autosubdomain=asdnone

;)

mentaldirector 04-27-2010 01:09 AM

Now I need to run it in a PHP script.

I'm trying exe command with php but there is no response. Do you have an idea?

slava 04-27-2010 11:24 PM

Try run as
Code:

/usr/bin/php-cgi -q script.php
or add to firstl line of script
Code:

#!/usr/bin/php-cgi -q
and run as
Code:

./script.php

mentaldirector 04-27-2010 11:56 PM

Thank you but I'm not trying to run phpscript in the shell.

I'm trying to run shell script in php script (with exec/system/passthru etc). I think there is a permission problem. For example I can run whoami and see which user executes php scripts. Then I've added that user to operator group to enable letting it run shell scripts. But it didn't work.

By the way, my VPS is in JoinVPS and it's prebundled with FreeBSD 8.0 + ISP Manager. Actually it's working perfect, really. Better than any control panel app. Congratulations in deed.


All times are GMT +2. The time now is 10:56 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.