So, there's Ubic::Daemon, it's a pure daemonization module like Proc::Daemon.
Good things about it:
- cross-platform features (Win32 not implemented yet, but foundation is there)
- we debugged tons of bugs in it
- it doesn't require /etc/ubic/service/ at all
Bad things:
- ubic-guardian is required and can be annoying, but read https://metacpan.org/module/Ubic::Manual::FAQ#What-is-this-ubic-guardian-process-I-see-in-my-ps-aux-output-.
Then there is Ubic::Service base class and Ubic::Service::* modules.
They are polymorhic and extensible and can be customized for different daemons and different local policies. This is a good thing.
We want to reuse them in pure init script environment.
Service modules tied to /etc/ubic/service/ and other ubic machinery via ->name
, ->full_name
and ->parent_name
methods (there is no Mo*, but they're like rw accessors).
Ubic::Service::SimpleDaemon
and some other services depend on service name, so that pidfile can be generated based on it. It won't be hard to refactor most of them and make service name optional.
Then there is ubic service tree and Ubic.pm frontend and /usr/bin/ubic script. We want to make them all optional.