HI, I'm trying to get report_script to work with no luck.
1) There seems to be a conf argument passed - which is easy to workaround by adding..
2) "Option new_slave_hosts requires an argument"
How can this be sloved?
3) sh: 1: Syntax error: "(" unexpected
Seems to be caused by ( in the body text...
Here is my code:
use strict;
use warnings FATAL => 'all';
use Getopt::Long;
new_master_host and new_slave_hosts are set only when recovering master succeeded
OK, got ist solved.
1) remains, but again, this is easy to add
2) and 3) are solved by the correct email system command:
system("echo '$body' | mail -s '$subject' '$email'" );
HI, I'm trying to get report_script to work with no luck.
1) There seems to be a conf argument passed - which is easy to workaround by adding.. 2) "Option new_slave_hosts requires an argument" How can this be sloved? 3) sh: 1: Syntax error: "(" unexpected Seems to be caused by ( in the body text...
Here is my code:
use strict; use warnings FATAL => 'all';
use Getopt::Long;
new_master_host and new_slave_hosts are set only when recovering master succeeded
my ( $dead_master_host, $new_master_host, $conf, $new_slave_hosts, $subject, $body, $email ); GetOptions( 'orig_master_host=s' => \$dead_master_host, 'new_master_host=s' => \$new_master_host, 'conf=s' => \$conf, 'new_slave_hosts=s' => \$new_slave_hosts, 'subject=s' => \$subject, 'body=s' => \$body, );
exit &main();
sub main {
$email="myemail\@domain.de";
system("echo ".$body." | mail -s ".$subject." ".$email );
}
Thanks for help! Appreciate it!