Admin_Module

Provides administrative functions
extends Module\Skeleton\Standard uses ImpersonableTrait
Methods Summary
public
public
# get_domains( )
List all domains on the server
public
# get_address_from_domain( string $domain )
Get e-mail from domain
public
# get_site_id_from_domain( string $domain )
Translate domain to id
public
# get_email( )
Get appliance admin email Multiple entries returned as array
protected
public
# set_email( string $email )
Set appliance admin email
public
# list_plans( )
Get available plans
public
# get_plan( string $plan = NULL )
Get settings from plan
public
# get_service_info( string $service = NULL, string $plan = NULL )
Get listing of service variables
public
# update_webapps( array $options = array ( ) )
Force bulk update of webapps
public
# list_failed_webapps( string $site = NULL )
List all failed webapps
public
# reset_webapp_failure( array $constraints = array ( ) )
Reset failed apps
public
# locate_webapps( string|array $site = NULL )
Locate webapps under site
public
# prune_webapps( string|array $site = NULL )
Locate webapps under site
public
# delete_site( string $site , array $flags = array ( ) )
Delete site
public
# add_site( string $domain , string $admin , array $opts = array ( ), array $flags = array ( ) )
Add site
public
# edit_site( string $site , array $opts = array ( ), array $flags = array ( ) )
Edit site
public
# activate_site( string|array $site )
Activate site
public
# deactivate_site( array|string $site , array $flags = array ( ) )
Alias to
public
# suspend_site( string|array $site , array $flags = array ( ) )
Deactivate site
public
# hijack( string $site , string $user = NULL, string $gate = NULL )
Hijack a user account Replaces current session with new account session
public
# get_storage( )
Get server storage usage
public
# get_site_storage( array $sites = array ( ) )
Get storage used per site
public
# get_usage( string $field = 'storage', array $sites = array ( ) )
Get resource usage for site or collection of sites
public
# collect( array $params = array ( ), array $query = NULL, array $sites = array ( ) )
Collect account info "active" is a special $query param that picks active/inactive (true/false) sites
public
# kill_site( string $site )
Destroy all logins matching site
public
# get_meta_from_domain( string $domain , string $service , string $class = NULL )
Get account metadata
public
# activate_license( string $key )
Activate apnscp license
public
# renew_license( )
Renew apnscp license
public
# read_map( string $map )
Read a map from mappings/
public
public
# _cron( Cronus $c )
Methods inherited from Module\Skeleton\Standard
__construct(), setUserParameters(), autoloadModule(), __wakeup(), _invoke(), __debugInfo(), getExportedFunctions(), _reset(), cleanUserParameters(), query()
Methods used from ImpersonableTrait trait
impersonateRole() restoreImpersonator()
Constants Summary
public string ADMIN_HOME
# '/etc/opcenter/webhost'
public string ADMIN_CONFIG
# '.config/'
public string ADMIN_CONFIG_LEGACY
# '/etc/appliance/appliance.ini'
public string CGROUP_CACHE_KEY
# 'acct.cgroup'
Constants inherited from Module\Skeleton\Standard
DEPENDENCY_MAP
Properties Summary
protected $exportedFunctions

# array ( '*' => 8, )
Properties inherited from Module\Skeleton\Standard
$exportedFunctions, $username, $password, $domain, $user_id, $group_id, $permission_level, $session_id, $site, $site_id
Properties used from ImpersonableTrait