Re: How to recover from s6-rc broken pipe?

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Wed, 16 Dec 2020 21:34:04 +0000

> sudo rsync -avr --delete compiled/ /etc/s6-rc/compiled/
> sudo s6-rc-update /etc/s6-rc/compiled/

  There's your problem. You're overwriting the live database; that will
throw a wrench into everything.
  s6-rc-update needs to run while the live database is still the old
one. Only after s6-rc-update has completed can you delete the old
database.

  Do something like this instead:

stamp=`echo | s6-tai64n`
s6-rc-compile /etc/s6-rc/compiled-$stamp sources...
s6-rc-update /etc/s6-rc/compiled-$stamp
old=`readlink /etc/s6-rc/compiled`
ln -sf compiled-$stamp /etc/s6-rc/compiled.new
rename /etc/s6-rc/compiled.new /etc/s6-rc/compiled
rm -rf /etc/s6-rc/$old

--
  Laurent
Received on Wed Dec 16 2020 - 21:34:04 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC