aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabMod.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r--src/DabMod.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index 648b7ad..f238ca4 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -394,6 +394,25 @@ int launch_modulator(int argc, char* argv[])
throw std::runtime_error("Configuration error: Output not specified");
}
+ if (not mod_settings.startupCheck.empty()) {
+ etiLog.level(info) << "Running startup check '" << mod_settings.startupCheck << "'";
+ int wstatus = system(mod_settings.startupCheck.c_str());
+
+ if (WIFEXITED(wstatus)) {
+ if (WEXITSTATUS(wstatus) == 0) {
+ etiLog.level(info) << "Startup check ok";
+ }
+ else {
+ etiLog.level(error) << "Startup check failed, returned " << WEXITSTATUS(wstatus);
+ return 1;
+ }
+ }
+ else {
+ etiLog.level(error) << "Startup check failed, child didn't terminate normally";
+ return 1;
+ }
+ }
+
printModSettings(mod_settings);
ModulatorData m;