diff --git a/service/pom.xml b/service/pom.xml
index 57eb6c922..f932df5ca 100644
--- a/service/pom.xml
+++ b/service/pom.xml
@@ -593,6 +593,28 @@
+
+
+ * Note: the current implementation fails fast, rather than reporting multiple invalid files + */ +public class CheckServiceConfigurations { + + private void checkConfiguration(final File configDirectory) { + + final File[] configFiles = configDirectory.listFiles(f -> + !f.isDirectory() + && f.getPath().endsWith(".yml")); + + if (configFiles == null || configFiles.length == 0) { + throw new IllegalArgumentException("No .yml configuration files found at " + configDirectory.getPath()); + } + + for (File configFile : configFiles) { + String[] args = new String[]{"check", configFile.getAbsolutePath()}; + + try { + new WhisperServerService().run(args); + } catch (final Exception e) { + // Invalid configuration will cause the "check" command to call `System.exit()`, rather than throwing, + // so this is unexpected + throw new RuntimeException(e); + } + } + } + + public static void main(String[] args) { + + if (args.length != 1) { + throw new IllegalArgumentException("Expected single argument with config directory: " + Arrays.toString(args)); + } + + final File configDirectory = new File(args[0]); + + if (!(configDirectory.exists() && configDirectory.isDirectory())) { + throw new IllegalArgumentException("No directory found at " + configDirectory.getPath()); + } + + new CheckServiceConfigurations().checkConfiguration(configDirectory); + } + +}