From fc486d7da0f5bfdb6bd08e59ff004ca06b077e8e Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Thu, 9 May 2013 13:42:44 -0700 Subject: [PATCH] Start pt-agent --daemonize at end of --install. --- bin/pt-agent | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bin/pt-agent b/bin/pt-agent index ee9a958e..42dd387c 100755 --- a/bin/pt-agent +++ b/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; }