pls craft this script to add and restore 1000 accounts on cpanel serevrs
#!/usr/bin/perl -w
use strict;
use WWW::Mechanize;
use MIME:ase64;
my $mech = WWW::Mechanize->new( autocheck => 1 );
my @args = (
Authorization => "Basic " .
MIME:ase64::encode( 'user' . ':' . 'pass' )
);
$mech->credentials( 'http://hosting.com:5555', 'cPanel', 'user', 'pass' );
$mech->get( 'http://hosting.com:5555', @args );
$mech->follow_link( text => 'Addon Domains', n=> 1 );
this is the shell script logic i require and have it ti be used in the perl for use ::mewchanize
for a in `seq 1 10000`; do
/scripts/wwwacct domain$a.com user$a password
/scripts/pkgacct user$a
scp /home/cpmove-user$a.tar.gz user@remove.server:~
; done


LinkBack URL
About LinkBacks
Reply With Quote