mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
Makes kanidmd bail on startup if it can't find the webpkg dir (#531)
* Fixes #528 - DynamicUser was set to kanidmd * Make kanidmd bail if it cannot find the web ui files
This commit is contained in:
parent
8306c3bc6a
commit
8b7f196b2a
|
@ -140,3 +140,5 @@ Then you are able to build the UI.
|
|||
./build_wasm.sh
|
||||
|
||||
The "developer" profile for kanidmd will automatically use the pkg output in this folder.
|
||||
|
||||
Setting different developer profiles while building is done by setting the environment variable KANIDM_BUILD_PROFILE to one of the bare filename of the TOML files in `/profiles`. For example: `KANIDM_BUILD_PROFILE=release_suse_generic cargo build --release --bin kanidmd`
|
||||
|
|
|
@ -19,6 +19,7 @@ use kanidm_proto::v1::{
|
|||
};
|
||||
|
||||
use serde::Serialize;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
use uuid::Uuid;
|
||||
|
||||
|
@ -1199,6 +1200,15 @@ pub fn create_https_server(
|
|||
|
||||
// If we are no-ui, we remove this.
|
||||
if !matches!(role, ServerRole::WriteReplicaNoUI) {
|
||||
let pkg_path = PathBuf::from(env!("KANIDM_WEB_UI_PKG_PATH"));
|
||||
if !pkg_path.exists() {
|
||||
eprintln!(
|
||||
"Couldn't find Web UI package path: ({}), quitting.",
|
||||
env!("KANIDM_WEB_UI_PKG_PATH")
|
||||
);
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
tserver.at("/").get(index_view);
|
||||
tserver
|
||||
.at("/pkg")
|
||||
|
|
Loading…
Reference in a new issue