mirror of
https://github.com/LX3JL/xlxd.git
synced 2025-12-06 07:42:01 +01:00
Make ambed.service systemd native. This allows to make xlx start when ambed.service is fully started up.
This commit is contained in:
parent
bad324fdcf
commit
bbe62c9ca9
|
|
@ -27,6 +27,7 @@
|
|||
#include "ccontroller.h"
|
||||
#include "cvocodecs.h"
|
||||
#include "cambeserver.h"
|
||||
#include <systemd/sd-daemon.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
@ -81,6 +82,7 @@ bool CAmbeServer::Start(void)
|
|||
{
|
||||
//
|
||||
m_pThread = new std::thread(CAmbeServer::Thread, this);
|
||||
sd_notify(0, "READY=1");
|
||||
}
|
||||
|
||||
// done
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include "main.h"
|
||||
#include <string.h>
|
||||
#include "cvocodecs.h"
|
||||
#include <systemd/sd-daemon.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
|
|
|
|||
|
|
@ -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 $@
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue