#!/usr/bin/env perl

# Use mandatory external modules
use strict;
use warnings FATAL => 'all';
use MMM::Common::Config;
use MMM::Agent::Helpers::Actions;

# Check arguments
if (scalar(@ARGV) != 1) {
	print "Usage: $0 <config_file>\n\n";
	exit(1);
}

# Read config file
my $config_file = shift;
our $config = new MMM::Common::Config::;
$config->read($config_file);
$config->check('AGENT');

# Finally do the work
my $output = MMM::Agent::Helpers::Actions::toggle_slave(0);

print $output, "\n";
exit(0);

__END__

=head1 NAME

turn_off_slave

=head1 DESCRIPTION

turn_off_slave is a helper binary for B<mmm_agentd>. It stops the slave threads on the local MySQL server.

=head1 USAGE

turn_off_slave
