view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
END
print $message;
die "User $ENV{USER} is not supported, log in as root or use sudo";
}
sub check_for_cpan {
my $check=`perl -MCPAN -e 1 2>&1`;
if (-1<index $check,"Can't locate CPAN") {
if ($aws) {
system('sudo dnf -y install cpan');
my $cmd='mkdir -pv '.(getpwuid $>)[7].'/.cpan/build';
`$cmd` || die "Cannot $cmd $!";
} else {
my $die="Can't locate CPAN.pm in \@INC ".
"(you may need to install the CPAN module)\n$!";
die $die;
}
} return 1;
}
};
unless (grep { /SKIP|CPAN|figlet/ } @ARGV) {
use if (check_for_cpan()),'CPAN';
eval {
local $SIG{__DIE__}; # No sigdie handler
require CPAN;
CPAN::HandleConfig->load;
};
my $d = $CPAN::Config->{build_dir};
if (!(defined $d) || !(-d $d)) {
$d=(getpwuid $>)[7].'/.cpan/build';
my $cmd='mkdir -pv '.(getpwuid $>)[7].'/.cpan/build';
`$cmd` || die "Cannot $cmd $!";
unless (-d $d) {
unless (-d "/root/.cpan/build") {
die("ERROR - Can't locate .cpan/build directory");
} else {
$d='/root/.cpan/build';
}
}
}
$ENV{CPAN_BUILD_DIR}=$d;
Makefile.PL view on Meta::CPAN
print "***** Looking for Most Recent \"$look Dir\" \n";
my $d=$ENV{CPAN_BUILD_DIR}||'';
unless ($d) {
eval {
local $SIG{__DIE__}; # No sigdie handler
require CPAN;
CPAN::HandleConfig->load;
};
$d = $CPAN::Config->{build_dir};
if (!(defined $d) || !(-d $d)) {
$d=(getpwuid $>)[7].'/.cpan/build';
unless (-d $d) {
unless (-d "/root/.cpan/build") {
fa_die("ERROR - Can't locate .cpan/build directory");
} else {
$d='/root/.cpan/build';
}
}
}
$ENV{CPAN_BUILD_DIR}=$d;
}
Makefile.PL view on Meta::CPAN
}
my $testfind =`find -help 2>&1`;
my $maxdepth=(-1<index $testfind,'[-P]')?
" -maxdepth 4":'';
my $find_cmd1="${findpath}find ";
my $find_cmd2="$maxdepth -name \'*.h\' ".
"| ${xargspath}xargs ${greppath}grep ".
"${grepopt}DB_VERSION_STRING";
print "\nSearching for latest verison of Berkeley DB.\n".
"This may take up to five minutes ...\n\n";
FE: foreach my $dir ('/usr/','/opt/',(getpwuid $>)[7].'/') {
next if unpack('a1',$dir) eq '.';
next unless -d $dir;
opendir(DIR, $dir) or fa_die($!);
while (my $file = readdir(DIR) ) {
next if ($file eq "." or $file eq ".." or $file eq "doc" or
$file eq "X11R6" or $file eq "docs" or
$file eq "man" or $file eq "ssl" or
$file eq "license" or $file eq "logfile" or
$file eq "bin" or ($^O eq 'cygwin' &&
($file eq "Application Data" or
Makefile.PL view on Meta::CPAN
}
WriteAll();
if (keys %amazon) {
#fa_system('sudo make install');
fa_system('make install');
if (exists $amazon{argv}) {
my $p=$amazon{argv}->[0];
my $username=getlogin || getpwuid($<);
select STDOUT;
$log->close() if $log && -1<index $log,'*';
exec "/usr/local/bin/fa",'-i',$p,
'--iset-amazon','--login',
$username,'--log';
}
}
sub fa_find_editor {
my $editor=$_[0];
lib/Net/FullAuto.pm view on Meta::CPAN
=head1 SSH & SFTP Combined Synopsis
=over 4
=item
use Net::FullAuto;
my $ip_or_hostname = $ARGV[0] || 'localhost';
my $username = $ARGV[1] || getlogin || getpwuid($<);
my $identity_file = $ARGV[2] || ''; # required unless password or
# or key-based login
my $password = $ARGV[3] || ''; # required unless identity file
# or key-based login
my $remote_host_block={
Label => 'Remote Host',
Hostname => $ip_or_hostname,
Login => $username,
IdentityFile => $identity_file, # can leave out if password or
lib/Net/FullAuto.pm view on Meta::CPAN
=head1 SSH Synopsis
=over 4
=item
use Net::FullAuto;
my $ip_or_hostname = $ARGV[0] || 'localhost';
my $username = $ARGV[1] || getlogin || getpwuid($<);
my $identity_file = $ARGV[2] || ''; # required unless password or
# or key-based login
my $password = $ARGV[3] || ''; # required unless identity file
# or key-based login
my $remote_host_block={
Label => 'Remote Host',
Hostname => $ip_or_hostname,
Login => $username,
lib/Net/FullAuto.pm view on Meta::CPAN
=head1 SFTP Synopsis
=over 4
=item
use Net::FullAuto;
my $ip_or_hostname = $ARGV[0] || 'localhost';
my $username = $ARGV[1] || getlogin || getpwuid($<);
my $identity_file = $ARGV[2] || ''; # required unless password or
# or key-based login
my $password = $ARGV[3] || ''; # required unless identity file
# or key-based login
my $remote_host_block={
Label => 'Remote Host',
HostName => $ip_or_hostname,
LoginID => $username,
lib/Net/FullAuto/FA_Core.pm view on Meta::CPAN
our $home_dir='~';
if (exists $ENV{HOME} && -d $ENV{HOME}) {
$home_dir=$ENV{HOME};
} elsif (exists $ENV{USER} && $ENV{USER}) {
if (-d "/home/$ENV{USER}") {
$home_dir="/home/$ENV{USER}";
} elsif (-d "/export/home/$ENV{USER}") {
$home_dir="/export/home/$ENV{USER}";
}
} elsif ((getpwuid($<))[7]) {
$home_dir=(getpwuid($<))[7];
}
BEGIN {
my $md_='';our $thismonth='';our $thisyear='';
($md_,$thismonth,$thisyear)=(localtime)[3,4,5];
my $mo_=$thismonth;my $yr_=$thisyear;
$md_="0$md_" if $md_<10;
$mo_++;$mo_="0$mo_" if $mo_<10;
my $yr__=sprintf("%02d",$yr_%100);
lib/Net/FullAuto/FA_Core.pm view on Meta::CPAN
{
my $path=
substr($INC{'Net/FullAuto.pm'},0,
(rindex $INC{'Net/FullAuto.pm'},'Net'));
eval {
require "${path}Net/FullAuto/fa_global.pm";
my $mod="fa_global";
import $mod;
};
$username=getlogin || getpwuid($<);
$username=$Net::FullAuto::FA_Core::usrname if
defined $Net::FullAuto::FA_Core::usrname
&& $Net::FullAuto::FA_Core::usrname;
$username=$Net::FullAuto::fa_global::FA_Sudo{$username}
if exists $Net::FullAuto::fa_global::FA_Sudo{$username};
if (wantarray && !$@) {
my $force_login=0;
if (defined $Net::FullAuto::fa_global::FA_Force_Login &&
$Net::FullAuto::fa_global::FA_Force_Login) {
$force_login=$Net::FullAuto::fa_global::FA_Force_Login;
lib/Net/FullAuto/FA_Core.pm view on Meta::CPAN
$grepopt='-H ';
}
my $find_cmd1=$Net::FullAuto::FA_Core::gbp->('find')."find ";
my $find_cmd2=" -name \"*.h\" ".
"| ".$Net::FullAuto::FA_Core::gbp->('xargs')."xargs ".
$greppath."grep ".
"${grepopt}DB_VERSION_STRING";
print "\nSearching for latest verison of BerkeleyDB.\n".
"This may take up to five minutes ...\n\n";
foreach my $dir ('/usr/local/',
'/usr/','/opt/',(getpwuid $>)[7].'/') {
next if unpack('a1',$dir) eq '.';
next unless -d $dir;
opendir(DIR, $dir) or Net::FullAuto::FA_Core::handle_error($!);
while (my $file = readdir(DIR) ) {
next if ($file eq "." or $file eq ".." or $file eq "doc" or
$file eq "X11R6" or $file eq "docs" or
$file eq "man" or $file eq "ssl" or
$file eq "license" or $file eq "logfile" or
$file eq "bin" or ($^O eq 'cygwin' &&
($file eq "Application Data" or
lib/Net/FullAuto/FA_Core.pm view on Meta::CPAN
}
chomp($file);
next if $file=~/\/$/;
next if $file eq 'README';
if ($file=~s/^.*\s+($rx1|$rx2)$/$1/) {
$file=~
s/^\d+\s+\w\w\w\s+\d+\s+(?:\d\d:\d\d\s+|\d\d\d\d\s+)(.*)$/$1/;
}
push @file,$username.'/'.$dirr.'/'.$file;
}
my $owner=getpwuid(${stat($path)}[4]);
if ($owner eq $username) {
($stdout,$stderr)=cmd($Net::FullAuto::FA_Core::gbp->('ls').
"ls -1 ..");
&Net::FullAuto::FA_Core::handle_error($stderr) if $stderr;
foreach my $file (split "\n", $stdout) {
push @file, "Template $file" if $file=~/[.]pm$/;
}
push @file, "Global Settings fa_global.pm";
}
my %Menu_1=(
lib/Net/FullAuto/FA_Core.pm view on Meta::CPAN
} elsif (defined $passwrdnw) {
if ($passwrdnw) {
$passwd[0]=$passwrdnw;
$Net::FullAuto::FA_Core::password_from='cmd_line_arg';
} else {
$Net::FullAuto::FA_Core::save_main_pass=1;
} undef $passwrdnw;
} elsif (defined $go) {
$Net::FullAuto::FA_Core::save_main_pass=1;
}
my $uname_uid=getlogin || getpwuid($<);
my $launch_local_ssh_telnet=0;
if (defined $usrname) {
$username=$usrname;
$launch_local_ssh_telnet=1 if $username ne $uname_uid;
$username_from='cmd_line_arg';
$userflag=1;
} elsif (defined $go) {
$username=&Net::FullAuto::FA_Core::username();
$launch_local_ssh_telnet=1 if $username ne $uname_uid;
$username_from='go_arg_current';
lib/Net/FullAuto/FA_Core.pm view on Meta::CPAN
$userflag=0;@passwd=();
chomp($login_Mast_error);
$login_Mast_error=~s/^(.*try again.).*$/$1\n/s;
$login_Mast_error=~s/^debug1.*interactive\s*//s;
} else {
chomp($login_Mast_error);
}
}
if ((!$userflag && !$cron) ||
(defined $usrname && !$usrname) || $launch_local_ssh_telnet) {
my $uid=getlogin || getpwuid($<);
$launch_local_ssh_telnet=1;
if (!$Net::FullAuto::FA_Core::cron && !$usrname) {
while (1) {
if ($^O ne 'cygwin') {
print $blanklines;
} else {
print "$blanklines\n";
}
if ($login_Mast_error) {
if ($Net::FullAuto::FA_Core::debug) {
lib/Net/FullAuto/FA_Core.pm view on Meta::CPAN
require $fa_path.'/fa_global.pm';
$fa_global::berkeley_db_path||='';
if ($fa_global::berkeley_db_path &&
-d $fa_global::berkeley_db_path.'Defaults') {
BEGIN { $Term::Menus::facall=caller(2);
$Term::Menus::facall||='' };
use if (-1<index $Term::Menus::facall,'FullAuto'),
"BerkeleyDB";
my ($dbenv,$bdb)=
Net::FullAuto::FA_Core::connect_berkeleydb('Defaults');
my $username=getlogin || getpwuid($<);
if (exists $ENV{'SSH_CONNECTION'} &&
exists $ENV{'USER'} && ($ENV{'USER'}
ne $username)) {
$username=$ENV{'USER'};
} elsif ($username eq 'SYSTEM' &&
exists $ENV{'IWUSER'} && ($ENV{'IWUSER'}
ne $username)) {
my $login_flag=0;
foreach (@ARGV) {
my $argv=$_;
lib/Net/FullAuto/ISets/Amazon/Chaining_is.pm view on Meta::CPAN
use warnings;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw($select_chaining_setup);
use Net::FullAuto::Cloud::fa_amazon;
use Net::FullAuto::FA_Core qw[cmd_raw $localhost];
use File::HomeDir;
my $home_dir=File::HomeDir->my_home.'/';
my $username=getlogin || getpwuid($<);
my $do;my $ad;my $prompt;
my $configure_chaining=sub {
my $selection=$_[0]||'';
my ($stdout,$stderr)=('','');
my $handle=$localhost;my $connect_error='';
$localhost->cwd('~');
my $sudo=($^O eq 'cygwin')?'':'sudo ';
$do=1;
lib/Net/FullAuto/ISets/Local/EmailServer_is.pm view on Meta::CPAN
use Sys::Hostname;
my $tit='FullAuto.com';
my $adu='Administrator';
my $avail_port='';
my $hostname=Sys::Hostname::hostname;
my $home_dir=File::HomeDir->my_home;
$home_dir||=$ENV{'HOME'}||'';
$home_dir.='/';
my $username=getlogin || getpwuid($<);
my $do;my $ad;my $prompt;my $public_ip='';
my $builddir='';my @ls_tmp=();
# PHP Debugging
# error_log(__FILE__."\n".__LINE__." ". $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
# error_log(print_r($_REQUEST,TRUE)); For Sending Array to Log
# error_log(print_r(debug_backtrace(),TRUE));
# error_log(wp_debug_backtrace_summary());
# function cleanmsg($msg){
lib/Net/FullAuto/ISets/Local/EmailServer_is.pm view on Meta::CPAN
($stdout,$stderr)=$handle->cmd($sudo.
'cp -v /usr/local/etc/dovecot/conf.d/10-master.conf ~',
'__display__');
($stdout,$stderr)=$handle->cmd($sudo.
'chmod -v 777 ~/10-master.conf','__display__');
($stdout,$stderr)=$handle->cmd(
"echo -e \"$ad\" >> ~/10-master.conf");
($stdout,$stderr)=$handle->cmd($sudo.
'mv -v ~/10-master.conf /usr/local/etc/dovecot/conf.d/10-master.conf',
'__display__');
my $name=getpwuid($<);
($stdout,$stderr)=$handle->cmd($sudo.
"gpasswd -a $name dovecot",'__display__');
($stdout,$stderr)=$handle->cmd($sudo.
"ls -1 /usr/local/etc/dovecot/conf.d");
foreach my $file (split /\n/, $stdout) {
next if $file=~/\.+$/;
($stdout,$stderr)=$handle->cmd($sudo.
"chmod -v 660 /usr/local/etc/dovecot/conf.d/$file",
'__display__');
($stdout,$stderr)=$handle->cmd($sudo.
lib/Net/FullAuto/ISets/Local/FullAutoAPI_is.pm view on Meta::CPAN
our @ISA = qw(Exporter);
our @EXPORT = qw($select_fullautoapi_setup);
use Net::FullAuto::Cloud::fa_amazon;
use Net::FullAuto::FA_Core qw[$localhost cleanup fetch clean_filehandle];
use Time::Local;
use File::HomeDir;
my $home_dir=File::HomeDir->my_home;
$home_dir||=$ENV{'HOME'}||'';
$home_dir.='/';
my $username=getlogin || getpwuid($<);
my $do;my $ad;my $prompt;my $public_ip='';
my $builddir='';my @ls_tmp=();
my $avail_port='';
my $configure_fullautoapi=sub {
my $selection=$_[0]||'';
my $service_and_cert_password=$_[1]||'';
my $domain_url=$_[2]||'';
lib/Net/FullAuto/ISets/Local/PHP_is.pm view on Meta::CPAN
use Sys::Hostname;
my $tit='FullAuto.com';
my $adu='Administrator';
my $avail_port='';
my $hostname=Sys::Hostname::hostname;
my $home_dir=File::HomeDir->my_home;
$home_dir||=$ENV{'HOME'}||'';
$home_dir.='/';
my $username=getlogin || getpwuid($<);
my $do;my $ad;my $prompt;my $public_ip='';
my $builddir='';my @ls_tmp=();
# PHP Debugging
# error_log(__FILE__."\n".__LINE__." ". $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
# error_log(print_r($_REQUEST,TRUE)); For Sending Array to Log
# error_log(print_r(debug_backtrace(),TRUE));
# error_log(wp_debug_backtrace_summary());
# function cleanmsg($msg){
lib/Net/FullAuto/ISets/Local/WordPress_is.pm view on Meta::CPAN
use Sys::Hostname;
my $tit='FullAuto.com';
my $adu='Administrator';
my $avail_port='';
my $hostname=Sys::Hostname::hostname;
my $home_dir=File::HomeDir->my_home;
$home_dir||=$ENV{'HOME'}||'';
$home_dir.='/';
my $username=getlogin || getpwuid($<);
my $do;my $ad;my $prompt;my $public_ip='';
my $builddir='';my @ls_tmp=();
# PHP Debugging
# error_log(__FILE__."\n".__LINE__." ". $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
# error_log(print_r($_REQUEST,TRUE)); For Sending Array to Log
# error_log(print_r(debug_backtrace(),TRUE));
# error_log(wp_debug_backtrace_summary());
# function cleanmsg($msg){