#! /usr/bin/perl
# PODNAME: tapper-notify-daemon
# ABSTRACT: cmdline frontend to Tapper::Notification/daemonize

use strict;
use warnings;

use File::Spec::Functions 'tmpdir';
use Tapper::Notification;
use App::Daemon 'daemonize';

my ($tmpfh, $tmpfile) = tempfile("tapper-notification-daemon.log-XXXXX", UNLINK => 1);
$App::Daemon::as_user = "root";
$App::Daemon::logfile = $ENV{HARNESS_ACTIVE} ? $tmpfile : '/var/log/tapper-notification-daemon.log';
$App::Daemon::pidfile = tmpdir()."/tapper-notification-daemon.pid";
daemonize();
my $daemon = Tapper::Notification->new;
$daemon->loop;


__END__
=pod

=encoding utf-8

=head1 NAME

tapper-notify-daemon - cmdline frontend to Tapper::Notification/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

