NAME
Ubic::Service::SimpleDaemon - variant of service when your service is simple daemonized binary
VERSION
version 1.16
SYNOPSIS
use Ubic::Service::SimpleDaemon;
my $service = Ubic::Service::SimpleDaemon->new({
name => "sleep",
bin => "sleep 1000",
});
DESCRIPTION
Unlike Ubic::Service::Common, this class allows you to specify only name and binary of your service.
METHODS
- new($params)
-
Constructor.
Parameters:
- bin
-
Daemon binary.
- name
-
Service's name.
Optional, will usually be set by upper-level multiservice. Don't set it unless you know what you're doing.
- user
-
User under which daemon will be started. Optional, default is
root
. - group
-
Group under which daemon will be started. Optional, default is all user groups.
Value can be scalar or arrayref.
- stdout
-
File into which daemon's stdout will be redirected. Default is
/dev/null
. - stderr
-
File into which daemon's stderr will be redirected. Default is
/dev/null
.
- pidfile()
-
Get pid filename. It will be concatenated from simple-daemon pid dir and service's name.
SEE ALSO
Ubic::Daemon - module to daemonize any binary
AUTHOR
Vyacheslav Matjukhin <mmcleric@yandex-team.ru>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Yandex LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.