s6-rc-round-robin

runs services in order, starting the next one when the previous one
dies or fails to start
This commit is contained in:
Daniel Barlow
2024-07-08 21:53:51 +01:00
parent 07a6eb73cd
commit 534a49e827
3 changed files with 81 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
{
lualinux,
writeFennel,
anoia,
linotify,
fennel,
stdenv,
s6-rc-up-tree,
}:
stdenv.mkDerivation {
name = "s6-rc-round-robin";
src = ./.;
propagatedBuildInputs = [ s6-rc-up-tree ];
installPhase = ''
mkdir -p $out/bin
cp -p ${writeFennel "uevent-watch" {
packages = [fennel anoia linotify lualinux s6-rc-up-tree] ;
mainFunction = "run";
} ./robin.fnl} $out/bin/s6-rc-round-robin
'';
}