From ISPWiki

Jump to: navigation, search



The mgrctl utility is available in all our software products and is located in the /usr/local/ispmgr/sbin directory. You may use it to call ISPmanager functions from shell. We would recommend that you use our software functions via API, rather than via HTTP. You must have admin privileges (root privileges in ISPmanager).

Get a list of all mgrctl functions available:

/usr/local/ispmgr/sbin/mgrctl eventlist


The first argument is a function you want to call followed by the function parameters in the key=value format. For example:

/usr/local/ispmgr/sbin/mgrctl user

A list of users will be displayed

/usr/local/ispmgr/sbin/mgrctl user.edit elid=test

Get parameters of the test user.

/usr/local/ispmgr/sbin/mgrctl database su=test

Get a list of the test user databases.

Optional keys


-m <manager>      - name of the control panel's binary file that you want to call.
                    Default: ispmgr (regardless the software you are running). 
-o <output mode> - possible values: text, devel, xml. Default value - text.


Add domains in the "Domain management" module:

/usr/local/ispmgr/sbin/mgrctl -m ispmgr domain.edit ip= ns="" sok=ok su=fly

Delete a www domain:

/usr/local/ispmgr/sbin/mgrctl -m ispmgr wwwdomain.delete  sok=ok

Create a www domain:

/usr/local/ispmgr/sbin/mgrctl -m ispmgr wwwdomain.edit docroot=auto owner=fly autosubdomain=asdnone  ip= php=phpmod sok=ok

Update all the domains on external name servers:

for i in `/usr/local/ispmgr/sbin/mgrctl -m ispmgr domain | awk '{print $1}' | awk -F = '{print $2}'`; do /usr/local/ispmgr/sbin/mgrctl -m ispmgr domain.fix elid=$i;done
Was this helpful? Yes | No
Personal tools