Mgrctl is a utility that is used for performing operations with a control panel and calling its functions from the command line. The default location of the utility is /usr/local/mgr5/sbin/mgrctl.
-m <manager> - a short name of a control panel associated with the command. Enter a short name after the key:
- core — COREmanager;
ispmgr — ISPmanager;
- ispmgrnode — a cluster node in ISPmanager Business;
billmgr — BILLmanager;
vmmgr — VMmanager KVM or Cloud;
vemgr — VMmanager OVZ;
dcimgr — DCImanager;
- dcimini — DCImanager location;
ipmgr — IPmanager;
dnsmgr — DNSmanager.
-i — brief information about the functions of the control panel. If the function <funcname> is specified, brief information about all its parameters will be displayed. If the parameter lang is specified, the information on a selected language <language> will be displayed. Possible values:ru, en. The default value is ru.
-o <output format> — information output format. Possible values: text,xml, devel,json. The default value is text.
-l — suspend a control panel. The panel is suspended with the function exit. It cannot be restarted.
Suspending COREmanager will also suspend all the control panels on the server. Activating COREmanager will activate all the panels as well.
-u — resume the control panel that has been suspended with the -l key.
The control panels won't be activated if:
- The command mgrctl -m <manager> -l was executed to suspend several control panels on the server including COREmanager.
- COREmanager was activated with the command mgrctl -m core -u.
-R — restart the control panel before the function is executed.
<funcname> —a function name.
<param>=<value> — function parameter and its value.
-e ‘<param>=$<ENV_NAME>’ — parameters conveyed via environment variables.
Conveying parameters via environment variables
The feature is available in COREmanager version 5.325 and higher.
To convey secret data in mrgctl parameters, you can use environment variables. Run the utility with the parameter
<param> — parameter name
<ENV_NAME> — environment variable name
Put a $ sign in front of the variable name and escape the <param>=$<ENV_NAME> argument.
Example of conveying a password
Set the password value in the SECRET_PASSWORD environment variable:
- Create an FTP user in ISPmanager:
Examples for ISPmanager
<user> — a User name in ISPmanager.
Examples for BILLmanager
<id> — the tariff identifier
Examples for VMmanager KVM and Cloud
Examples for VMmanager OVZ
<id> — the VM identifier.
Examples for DCImanager
<admin> — administrator name in DCImanager.
<rack> — a rack name.
<admin> — administrator name
<pass> — administrator password
Examples for IPmanager
Examples for DNSmanager
<domain> — a domain name.
<user> — a User name in DNSmanager