I'm about to close #1121671[1] by adding metalog to the list of
syslogs in default-syslog service as a short term fix (since metalog
package is already in unstable); however discussion on how to
do/improve facilities is still open and can continue on this bug.
Avaliable options (so far) are:
* continue with default-syslog style shim services
* change name to selected services group, by adding a shared suffix
specific to each group (for example rsyslog.log, metalog.log ..)
Then use in runscripts like 'sv check /etc/service/*.log' to express
a dependency on a syslog service
* "tag" services with a facility file and add a 'facility' command
to check the status of services in the facility group ( and check
that the dependency is running);
NOTE: a patch for such facility program was attached to #1121671
this is also connected to runit-services's #1117993[2] bug (about
checking network); I'm now prioritizing other issues but as soon as
I've finished there I will write my reply here
Best,
Lorenzo
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1121617
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1117993
recap of #1121617 below
Lorenzo <plorenzo@disroot.org> wrote:
[ snip]
Andrew Bower <andrew@bower.uk> wrote:
===> /usr/sbin/facility <===
#!/usr/bin/perl -w
use strict;
use File::Basename;
use File::Glob qw(bsd_glob);
my $svdir = $ENV{SVDIR} // "/etc/service";
my $command = shift or die "usage: $0 command facility...";
my %providers = map {
map {
basename(dirname($_)) => 1
} bsd_glob("$svdir/*/provides-$_")
} @ARGV;
exec ("sv", $command, keys %providers) if %providers;
===> Some typical facility provides <===
sv/connman/provides-network
sv/dhclient/provides-network
sv/network-manager/provides-network
sv/rsyslog/provides-syslog
sv/unbound/provides-named
sv/wicd/provides-network
===> /etc/sv/acme/run <===
#! /lib/runit/invoke-run
facility start network syslog || exit 1
exec chpst -u _acmed:_acmed -012 /usr/sbin/acmed -D