fix(run/openrc): truncate runtime directory before starting Anubis (#1122)

If Anubis is not shut down correctly and there are leftover socket
files, Anubis will refuse to start.

As "checkpath -D" currently does not work as expected
(https://github.com/OpenRC/openrc/issues/335), simply use "rm -rf"
before starting Anubis.

Signed-off-by: Anna @CyberTailor <cyber@sysrq.in>
This commit is contained in:
Anna 2025-09-15 16:44:35 +05:00 committed by GitHub
parent d12993e31d
commit f745d37d90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -30,5 +30,6 @@ start_pre() {
return 1
fi
checkpath -d -o "${command_user?}" "/run/anubis_${instance?}"
rm -rf "/run/anubis_${instance?}"
checkpath -D -o "${command_user?}" "/run/anubis_${instance?}"
}