Start pt-agent --daemonize at end of --install.

This commit is contained in:
Daniel Nichter
2013-05-09 13:42:44 -07:00
parent 5faa104378
commit fc486d7da0

View File

@@ -6860,6 +6860,21 @@ pass=$random_pass
. $EVAL_ERROR; . $EVAL_ERROR;
} }
print "Starting pt-agent...\n";
my $env = get_env();
my $cmd = "$env $FindBin::Bin/pt-agent --daemonize";
my $ret = system($cmd);
if ( $ret >> 8 ) {
die "Sorry, an error occured while starting pt-agent.\n";
}
my $hostname = `hostname`;
chomp($hostname);
print "pt-agent has started. Visit https://pws.percona.com to enable "
. "services for this agent. The agent is listed as its hostname, "
. "$hostname.\n";
return; return;
} }