#! /usr/bin/perl
# PODNAME: tapper-mcp-daemonize
# ABSTRACT: cmdline frontend to Tapper::MCP::Master/daemonize

use strict;
use warnings;

# TODO: redirect STDERR/STDOUT

use Tapper::MCP::Startup;
use App::Daemon 'daemonize';
$App::Daemon::as_user = "root";
$App::Daemon::logfile = $ENV{HARNESS_ACTIVE} ? '/tmp/tapper-mcp-daemon.log' : "/var/log/tapper-mcp-daemon.log";
$App::Daemon::pidfile = "/tmp/tapper-mcp-daemon.pid";
daemonize();
my $mcp = new Tapper::MCP::Master;
$mcp->run;


__END__
=pod

=encoding utf-8

=head1 NAME

tapper-mcp-daemonize - cmdline frontend to Tapper::MCP::Master/daemonize

=head1 AUTHOR

AMD OSRC Tapper Team <tapper@amd64.org>

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2012 by Advanced Micro Devices, Inc..

This is free software, licensed under:

  The (two-clause) FreeBSD License

=cut

