s6-rc: remove more unnecessarily files from live dir

This commit is contained in:
Colin 2024-03-26 00:37:09 +00:00
parent 2cabe51956
commit 5cd9f34884
1 changed files with 6 additions and 1 deletions

View File

@ -291,9 +291,14 @@ in
wait "$SVSCAN"
# cleanup the servicedirs: remove files which s6-svscan will want to create for itself.
# TODO: is it also worth removing the binaries, which should be ignored, as a precaution?
rm "$LIVE/servicedirs"/*/supervise/{control,death_tally,lock,status}
rmdir "$LIVE/servicedirs"/*/{event,supervise}
# remove files which just aren't needed (because they live in the s6-svscan dir instead)
rm "$LIVE/servicedirs"/*/{run,run.user,finish,finish.user,notification-fd}
rm -rf "$LIVE/servicedirs"/*/data
# ^ so wait, after this every live/servicedirs/FOO directory is literally just an empty directory.
# i can *surely* simplify all of this; maybe not even invoke s6-rc-init here at *all*.
mkdir "$LIVE/servicedirs/.s6-svscan"
# remove unnecessary, duplicated dirs