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 /opt/ispsystem/dnsmanager6/sbin/mgrctl.
Syntax
/opt/ispsystem/dnsmanager6/sbin/mgrctl -m dcimgr [-u | -i [lang=<language>] | -l | [[-o <output format>] [-R | <funcname> [[<param>=<value>] ...]] [[-e ‘<param>=$<ENV_NAME>’] ...]]]
-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.
-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.
Examples of use
/opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr exit
/opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr -i
/opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr -i funcname lang=ru
/opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr domain.refresh elid=<domain>
for i in $(/opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr domain su=<user> | awk '{print $4}' | awk -F= '{print $2}'); do /opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr domain.refresh elid=$i; done