Edit File: premodifyacct.pl
#!/usr/bin/perl =pod /******************************************************************************\ |* ======================== I N S T A L L A T R O N ========================= *| |* *| |* THIS IS COPYRIGHTED WORK *| |* ``````````````````````````` *| |* All text, code and logic contained herein is copyright by Installatron and *| |* is a part of 'the Installatron program' as defined in the Installatron *| |* license: http://installatron.com/license *| |* *| |* THE COPYING OR REPRODUCTION OF ANY TEXT, PROGRAM CODE OR LOGIC COPYRIGHT *| |* INSTALLATRON IS EXPRESSLY PROHIBITED. VIOLATORS WILL BE PROSECUTED TO THE *| |* FULL EXTENT OF THE LAW. *| |* *| |* If this license is not clear to you, DO NOT CONTINUE; *| |* instead, contact Installatron at: support@installatron.com *| |* *| |* @revision 2010-09-01 *| |* *| \******************************************************************************/ =cut my %OPTS = @ARGV; my $currentDomain; open my $info, "/var/cpanel/users/".$OPTS{"user"}; while( my $line = <$info>) { if ( $line =~ /^DNS=(.+)/ ) { $currentDomain = $1; } } close $info; print "/usr/local/installatron/installatron --edit --user='".$OPTS{"user"}."' --id=':all' --replace-domain='".$currentDomain."=".$OPTS{"domain"}."'\n"; system("/usr/local/installatron/installatron", "--edit", "--user", $OPTS{"user"}, "--id", ":all", "--replace-domain", $currentDomain."=".$OPTS{"domain"} );
Back to File Manager