View | Details | Raw Unified | Return to bug 36766
Collapse All | Expand All

(-)a/misc/cronjobs/sftp_file.pl (-20 / +19 lines)
Lines 32-50 sftp_file.pl - SFTP a file to a remote server Link Here
32
32
33
=head1 SYNOPSIS
33
=head1 SYNOPSIS
34
34
35
sftp_file.pl [ -h | -m ] [ -v ] host user pass upload_dir port file email
35
sftp_file.pl [ --help | --man ] [ -v ] -h host -u user -p pass -d upload_dir --port port -f file -e email
36
36
37
 Options:
37
 Options:
38
   -h --help       brief help message
38
   --help       brief help message
39
   -m --man        full documentation, same as --help --verbose
39
   -m --man        full documentation, same as --help --verbose
40
   -v --verbose    verbose output
40
   -v --verbose    verbose output
41
   --host          SFTP host to upload to
41
   -h --host          SFTP host to upload to
42
   --user          SFTP user
42
   -u --user          SFTP user
43
   --pass          SFTP password
43
   -p --pass          SFTP password
44
   --upload_dir    Directory on SFTP host to upload to
44
   -u --upload_dir    Directory on SFTP host to upload to
45
   --port          SFTP upload port to use - falls back to port 22
45
   -P --port          SFTP upload port to use - falls back to port 22
46
   --file          File to SFTP to host
46
   -f --file          File to SFTP to host
47
   --email         Email address to receive confirmation of SFTP upload success or failure
47
   -e --email         Email address to receive confirmation of SFTP upload success or failure
48
48
49
=head1 OPTIONS
49
=head1 OPTIONS
50
50
Lines 129-144 my $sftp_status = undef; Link Here
129
my $command_line_options = join( " ", @ARGV );
129
my $command_line_options = join( " ", @ARGV );
130
130
131
GetOptions(
131
GetOptions(
132
    'help|?'       => \$help,
132
    'help|?'         => \$help,
133
    'man'          => \$man,
133
    'm|man'          => \$man,
134
    'verbose'      => \$verbose,
134
    'v|verbose'      => \$verbose,
135
    'host=s'       => \$host,
135
    'h|host=s'       => \$host,
136
    'user=s'       => \$user,
136
    'u|user=s'       => \$user,
137
    'pass=s'       => \$pass,
137
    'p|pass=s'       => \$pass,
138
    'upload_dir=s' => \$upload_dir,
138
    'd|upload_dir=s' => \$upload_dir,
139
    'port=s'       => \$port,
139
    'port=s'         => \$port,
140
    'file=s'       => \$file,
140
    'f|file=s'       => \$file,
141
    'email=s'      => \$email,
141
    'e|email=s'      => \$email,
142
) or pod2usage(2);
142
) or pod2usage(2);
143
pod2usage( -verbose => 2 ) if ($man);
143
pod2usage( -verbose => 2 ) if ($man);
144
pod2usage( -verbose => 2 ) if ( $help and $verbose );
144
pod2usage( -verbose => 2 ) if ( $help and $verbose );
145
- 

Return to bug 36766