#!/usr/bin/perl -w -T
# +=======================================================================+
# || /usr/sbin/cipux_rpcd                                                ||
# ||                                                                     ||
# || Daemon for the CipUX::Task API of CipUX                             ||
# ||                                                                     ||
# || Copyright (C) 2007 - 2009 by Christian Kuelker                      ||
# ||                           All rights reserved!                      ||
# ||                                                                     ||
# || License: GNU General Public License - GPL version 2                 ||
# ||          or (at your opinion) any later version.                    ||
# ||                                                                     ||
# +=======================================================================+
# ID:       $Id$
# Revision: $Revision$
# Head URL: $HeadURL$
# Date:     $Date$
# Source:   $Source$

package cipux_rpcd;

use 5.008001;
use strict;
use warnings;
use CipUX::RPC::Server::Daemon;

use version; our $VERSION = qv('3.4.0.0');
delete @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)};    # Make %ENV safer

# +=============================================================================+
# || MAIN                                                                      ||
# +=============================================================================+
my $daemon = CipUX::RPC::Server::Daemon->new( { name => 'cipux_rpcd' } );

$daemon->run();

exit 0;

__END__

#===========================================================================
#==== Documentation ========================================================
#===========================================================================

=pod

=head1 NAME

cipux_rpcd

=head1 VERSION

version 3.4.0.0

=head1 SYNOPSIS

 cipux_rpcd

=head1 DESCRIPTION

This is the CipUX XML-RPC daemon for the CipUX::Task API. The daemon provides
CipUX commands to RPC clients.

=head1 OPTIONS

I<-c>

Same as --cfg

I<--cfg>

Specifies the configuration.

I<-D>

The same as --debug

I<debug>

I<h>

The same as --help

I<help>

I<n>

The same as --nofork

I<nofork>

Do not for the server.

I<V>

The same as --version.

I<version>

Prints the version.

=head1 USAGE

  cipux_rpcd [OPTIONS]

=head1 EXAMPLE

  cipux_rpcd

  cipux_rpcd --debug

=head1 REQUIRED ARGUMENTS

None.

=head1 DIAGNOSTICS

None.

=head1 CONFIGURATION

None.

=head1 DEPENDENCIES

       CipUX::RPC::Server::Daemon
       version

=head1 INCOMPATIBILITIES

Not known.

=head1 BUGS AND LIMITATIONS

Supports https only via stunnel4.

=head1 SEE ALSO

See the CipUX webpage and the manual at L<http://www.cipux.org>
See the mailing list L<http://sympa.cipworx.org/wws/info/cipux-devel>

=head1 AUTHOR

Christian Kuelker  E<lt>christian.kuelker@cipworx.orgE<gt>

=head1 LICENSE AND COPYRIGHT

Copyright (C) 2007 - 2009 by Christian Kuelker

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA

=cut

