From f745d37d9006c3431bf3d435c61565250ab53a3e Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 15 Sep 2025 16:44:35 +0500 Subject: [PATCH] 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 --- docs/docs/CHANGELOG.md | 1 + run/openrc/anubis.initd | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs/CHANGELOG.md b/docs/docs/CHANGELOG.md index 1322e4a..e503a78 100644 --- a/docs/docs/CHANGELOG.md +++ b/docs/docs/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add the `DIFFICULTY_IN_JWT` option, which allows one to add the `difficulty` field in the JWT claims which indicates the difficulty of the token ([#1063](https://github.com/TecharoHQ/anubis/pull/1063)). - Ported the client-side JS to TypeScript to avoid egregious errors in the future. - Fixes concurrency problems with very old browsers ([#1082](https://github.com/TecharoHQ/anubis/issues/1082)). +- Update OpenRC service to truncate the runtime directory before starting Anubis. ### Bug Fixes diff --git a/run/openrc/anubis.initd b/run/openrc/anubis.initd index 3b74924..7c8c9ab 100644 --- a/run/openrc/anubis.initd +++ b/run/openrc/anubis.initd @@ -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?}" }