mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-13 14:39:28 +00:00
Start pt-agent --daemonize at end of --install.
This commit is contained in:
15
bin/pt-agent
15
bin/pt-agent
@@ -6860,6 +6860,21 @@ pass=$random_pass
|
||||
. $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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user