aboutsummaryrefslogtreecommitdiffstats
user goetia-shutdown

goetia-base
goetia
Software
0x53.net

The user goetia-shutdown service

The user goetia-shutdown service is used to tear down user supervision trees. Upon being started it:

  • It reads the USER environment variable, if it is empty it exits 100.
  • It reads the USERTREE environment variable, If it is empty it exits 100.
  • It checks whether the subdirectory ${USER}/${USERTREE} of the user runtime directory exists. If not, meaning no user supervision tree is running, it exits 0.
  • It makes all of its stdout and stderr go to the s6-svscan-log of the user supervision tree.
  • It stops all services managed by s6-rc.
  • It sends SIGHUP to s6-svscan-log of the user supervision tree. This is important, since s6-svscan will keep the fifo open, waiting for s6-svscan-log to exit, which in turn waits for EOF before exiting itself. SIGHUP tells s6-svscan-log to immediatly exit.
  • It tells s6-svscan to stop all remaining services and exit.