perl-API-DirectAdmin-0.09-alt1.noarch.rpm


Advertisement

Description

perl-API-DirectAdmin - interface to the DirectAdmin Hosting Panel API ( http://www.directadmin.com )

Distribution: ALT Linux Sisyphus
Repository: Autoimports noarch
Package name: perl-API-DirectAdmin
Package version: 0.09
Package release: alt1
Package architecture: noarch
Package type: rpm
Installed size: 27.93 KB
Download size: 27.93 KB
Official Mirror: ftp.altlinux.org
use API::DirectAdmin; my %auth = ( auth_user => 'admin_name', auth_passwd => 'admin_passwd', host => '11.22.33.44', ); my $da = API::DirectAdmin->new(%auth); my $ip_list = $da->ip->list(); unless ($ip_list && ref $ip_list eq 'ARRAY' && scalar @$ip_list) { die 'Cannot get ip list from DirectAdmin'; } my $ip = $ip_list->[0]; my $dname = 'reg.ru'; my $user_name = 'user1'; my $email = 'user1@example.com'; my $package = 'newpackage'; my $client_creation_result = $da->user->create( { username => $user_name, passwd => 'user_password', passwd2 => 'user_password', domain => $dname, email => $email, package => $package, ip => $ip, }); my $suspend_result = $da->user->disable( { select0 => $user_name, } ); if ( $suspend_result->{error} == 1 ) { die "Cannot suspend account $suspend_result->{text}"; } my $resume_result = $da->user->enable( { select0 => $user_name, } ); if ( $resume_result->{error} == 1 ) { die "Cannot Resume account $resume_result->{text}"; } my $delete_result = $da->user->delete( { select0 => $user_name, } ); if ( $delete_result->{error} == 1 ) { die "Cannot delete account $delete_result->{text}"; } my %params = ( action => 'package', package => 'package_name', user => 'username', ); my $responce = $da->query( command => 'CMD_API_MODIFY_USER', method => 'POST', params => \%params, allowed_fields => 'action package user', );

Alternatives

Provides

  • perl(API/DirectAdmin.pm) = 0.090
  • perl(API/DirectAdmin/Component.pm) = 0.020
  • perl(API/DirectAdmin/DNS.pm) = 0.060
  • perl(API/DirectAdmin/Domain.pm) = 0.050
  • perl(API/DirectAdmin/Ip.pm) = 0.050
  • perl(API/DirectAdmin/Mysql.pm) = 0.050
  • perl(API/DirectAdmin/User.pm) = 0.060
  • perl-API-DirectAdmin = 0.09-alt1

    Install Howto

    1. Add the following line to /etc/apt/sources.list:
      rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
      rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
      
    2. Update the package index:
      # sudo apt-get update
    3. Install perl-API-DirectAdmin rpm package:
      # sudo apt-get install perl-API-DirectAdmin

    Files

    • /usr/share/doc/perl-API-DirectAdmin-0.09/Changes
    • /usr/share/doc/perl-API-DirectAdmin-0.09/README
    • /usr/share/doc/perl-API-DirectAdmin-0.09/description
    • /usr/share/perl5/API/DirectAdmin.pm
    • /usr/share/perl5/API/DirectAdmin/Component.pm
    • /usr/share/perl5/API/DirectAdmin/DNS.pm
    • /usr/share/perl5/API/DirectAdmin/Domain.pm
    • /usr/share/perl5/API/DirectAdmin/Ip.pm
    • /usr/share/perl5/API/DirectAdmin/Mysql.pm
    • /usr/share/perl5/API/DirectAdmin/User.pm
    Advertisement
    Advertisement