Make xlxd.service systemd native.

This commit is contained in:
Fabian Franz 2024-07-19 16:13:23 +02:00
parent bbe62c9ca9
commit bf8b205fca
3 changed files with 4 additions and 2 deletions

View file

@ -3,7 +3,7 @@ Description=XLX Reflector (XLX999)
After=network.target ambed.service
[Service]
Type=forking
Type=notify
User=xlxd
Group=xlxd
AmbientCapabilities=CAP_NET_RAW

View file

@ -31,6 +31,7 @@
#include "ctranscoder.h"
#include "cysfnodedirfile.h"
#include "cysfnodedirhttp.h"
#include <systemd/sd-daemon.h>
////////////////////////////////////////////////////////////////////////////////////////
// constructor
@ -132,6 +133,7 @@ bool CReflector::Start(void)
#ifdef JSON_MONITOR
m_JsonReportThread = new std::thread(CReflector::JsonReportThread, this);
#endif
sd_notify(0, "READY=1");
}
else
{

View file

@ -1,6 +1,6 @@
CC=g++
CFLAGS=-c -std=c++11 -pthread
LDFLAGS=-std=c++11 -pthread
LDFLAGS=-std=c++11 -pthread -lsystemd
SOURCES=$(wildcard *.cpp)
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=xlxd