From 044d8a3457aa8e2b82a291a92e1fbfe973c56b44 Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Wed, 5 Aug 2020 16:07:47 -0400 Subject: [PATCH] Create /run/citadel/realms/current if it does not exist or inotify watch will fail --- libcitadel/src/realm/events.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcitadel/src/realm/events.rs b/libcitadel/src/realm/events.rs index 0061bfe..4dbc438 100644 --- a/libcitadel/src/realm/events.rs +++ b/libcitadel/src/realm/events.rs @@ -293,6 +293,8 @@ impl InotifyEventListener { .map_err(context!("inotify initialization failed"))?; let realms_watch = inotify.add_watch("/realms", WatchMask::MOVED_FROM|WatchMask::MOVED_TO) .map_err(context!("error adding watch for /realms to inotify"))?; + + util::create_dir("/run/citadel/realms/current")?; let current_watch = inotify.add_watch("/run/citadel/realms/current", WatchMask::CREATE|WatchMask::MOVED_TO) .map_err(context!("error adding watch for /run/citadel/realms/current to inotify"))?;