diff --git a/ambed/cambeserver.cpp b/ambed/cambeserver.cpp index 9ce1da2..ce25b8b 100644 --- a/ambed/cambeserver.cpp +++ b/ambed/cambeserver.cpp @@ -27,6 +27,7 @@ #include "ccontroller.h" #include "cvocodecs.h" #include "cambeserver.h" +#include //////////////////////////////////////////////////////////////////////////////////////// @@ -81,6 +82,7 @@ bool CAmbeServer::Start(void) { // m_pThread = new std::thread(CAmbeServer::Thread, this); + sd_notify(0, "READY=1"); } // done diff --git a/ambed/cvocodecs.cpp b/ambed/cvocodecs.cpp index c9e4643..eee7374 100644 --- a/ambed/cvocodecs.cpp +++ b/ambed/cvocodecs.cpp @@ -25,6 +25,7 @@ #include "main.h" #include #include "cvocodecs.h" +#include //////////////////////////////////////////////////////////////////////////////////////// // global object @@ -243,10 +244,12 @@ bool CVocodecs::Init(void) if ( ok ) { std::cout << "Codec interfaces initialized successfully : " << iNbCh << " channels available" << std::endl; + sd_notifyf(0, "STATUS=Codec interfaces initialized successfully : %i channels available", iNbCh); } else { std::cout << "At least one codec interfaces failed to initialize : " << iNbCh << " channels availables" << std::endl; + sd_notifyf(0, "At least one codec interfaces failed to initialize : %i channels availables", iNbCh); } // done return ok; diff --git a/ambed/makefile b/ambed/makefile index c556a28..fcfd570 100644 --- a/ambed/makefile +++ b/ambed/makefile @@ -8,7 +8,7 @@ EXECUTABLE=ambed all: $(SOURCES) $(EXECUTABLE) $(EXECUTABLE): $(OBJECTS) - $(CC) $(LDFLAGS) $(OBJECTS) -lftd2xx -Wl,-rpath,/usr/local/lib -o $@ + $(CC) $(LDFLAGS) $(OBJECTS) -lftd2xx -I/usr/src/libftd2xx-x86_64-1.4.27 -Wl,-rpath,/usr/local/lib -lsystemd -o $@ .cpp.o: $(CC) $(CFLAGS) $< -o $@ diff --git a/scripts/ambed.service b/scripts/ambed.service index 8332fae..42786da 100644 --- a/scripts/ambed.service +++ b/scripts/ambed.service @@ -3,7 +3,7 @@ Description=AMBE Transcoder Daemon After=network.target [Service] -Type=simple +Type=notify User=root Group=root ExecStartPre=-/sbin/rmmod ftdi_sio