Содержание

ISPmanager 5 API. Примеры использования


Возможности

FTP-сервер

/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=ftp packagegroup_ftp=proftp sok=ok
/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=ftp packagegroup_ftp=turn_off sok=ok

Веб-сервер

/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=web package_awstats=off package_logrotate=on package_nginx=on package_php=off package_php-fpm=on packagegroup_apache=turn_off sok=ok
/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=web package_awstats=off package_logrotate=on package_nginx=on package_php=on package_php-fpm=off packagegroup_apache=apache-itk sok=ok

Сервер БД

/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=mysql package_mysql=on sok=ok
/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=mysql package_mysql=off sok=ok

phpMyAdmin

/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=phpmyadmin package_phpmyadmin=on sok=ok
/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=phpmyadmin package_phpmyadmin=off sok=ok

Почтовый сервер

/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=email package_afterlogic=on package_clamav=on package_clamav-postfix=off package_clamav-sendmail=off package_dovecot=on package_greylist-postfix=off package_greylist-sendmail=off package_opendkim=on package_opendkim-postfix=off package_opendkim-sendmail=off package_postgrey=on package_roundcube=off package_sieve=on package_spamassassin=on package_spamassassin-postfix=off package_spamassassin-sendmail=off packagegroup_mta=exim sok=ok

Альтернативные версии PHP

/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=altphp71 package_ispphp71_fpm=off package_ispphp71_mod_apache=on packagegroup_altphp71gr=ispphp71 sok=ok
/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=altphp71 package_ispphp71_fpm=on package_ispphp71_mod_apache=on packagegroup_altphp71gr=ispphp71 sok=ok
/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=altphp70 package_ispphp70_fpm=on package_ispphp70_mod_apache=on packagegroup_altphp70gr=ispphp70 sok=ok
/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=altphp56 package_ispphp56_fpm=on package_ispphp56_mod_apache=on packagegroup_altphp56gr=ispphp56 sok=ok
/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=altphp55 package_ispphp55_fpm=on package_ispphp55_mod_apache=on packagegroup_altphp55gr=ispphp55 sok=ok
/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=altphp54 package_ispphp54_fpm=on package_ispphp54_mod_apache=on packagegroup_altphp54gr=ispphp54 sok=ok
/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=altphp53 package_ispphp53_fpm=on package_ispphp53_mod_apache=on packagegroup_altphp53gr=ispphp53 sok=ok
/usr/local/mgr5/sbin/mgrctl -m ispmgr feature.edit elid=altphp52 package_ispphp52_mod_apache=on packagegroup_altphp52gr=ispphp52 sok=ok

Учётные записи

Создать пользователя www-data

/usr/local/mgr5/sbin/mgrctl -m ispmgr user.add.user \
fullname= \
limit_cgi=on \
limit_cgi_inaccess= \
limit_charset=off \
limit_db= \
limit_db_enabled=on \
limit_db_inaccess= \
limit_db_users= \
limit_db_users_inaccess= \
limit_dirindex=index.php \
limit_php_cgi_enable=on \
limit_php_cgi_version=native \
limit_php_fpm_version=native \
limit_php_mode=php_mode_mod \
limit_php_mode_cgi=on \
limit_php_mode_cgi_inaccess= \
limit_php_mode_fcgi_nginxfpm=on \
limit_php_mode_fcgi_nginxfpm_inaccess= \
limit_php_mode_mod=on \
limit_php_mode_mod_inaccess= \
limit_shell=on \
limit_shell_inaccess= \
limit_ssl=on \
limit_ssl_inaccess= \
limit_webdomains= \
limit_webdomains_enabled=on \
limit_webdomains_inaccess= \
name=www-data \
passwd=9F4e3U9u \
php_enable=on \
preset=\#custom \
next=ok \
domain= \
web_inaccess= \
webdomain=off \
webdomain_ip= \
webdomain_name= \
zoom-limit_dirindex=index.php \
sok=ok

Удалить пользователя www-data

/usr/local/mgr5/sbin/mgrctl -m ispmgr user.delete elid=www-data sok=ok

Модули

Установка модуля Let's Encrypt

/usr/local/mgr5/sbin/mgrctl -m ispmgr plugin name=ispmanager-plugin-letsencrypt clicked_button=install sok=ok

Удаление модуля Let's Encrypt

/usr/local/mgr5/sbin/mgrctl -m ispmgr plugin name=ispmanager-plugin-letsencrypt clicked_button=delete sok=ok