mirror of
https://github.com/LX3JL/xlxd.git
synced 2025-12-06 07:42:01 +01:00
Make xlxd.service systemd native.
This commit is contained in:
parent
bbe62c9ca9
commit
bf8b205fca
|
|
@ -3,7 +3,7 @@ Description=XLX Reflector (XLX999)
|
||||||
After=network.target ambed.service
|
After=network.target ambed.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=notify
|
||||||
User=xlxd
|
User=xlxd
|
||||||
Group=xlxd
|
Group=xlxd
|
||||||
AmbientCapabilities=CAP_NET_RAW
|
AmbientCapabilities=CAP_NET_RAW
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
#include "ctranscoder.h"
|
#include "ctranscoder.h"
|
||||||
#include "cysfnodedirfile.h"
|
#include "cysfnodedirfile.h"
|
||||||
#include "cysfnodedirhttp.h"
|
#include "cysfnodedirhttp.h"
|
||||||
|
#include <systemd/sd-daemon.h>
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// constructor
|
// constructor
|
||||||
|
|
@ -132,6 +133,7 @@ bool CReflector::Start(void)
|
||||||
#ifdef JSON_MONITOR
|
#ifdef JSON_MONITOR
|
||||||
m_JsonReportThread = new std::thread(CReflector::JsonReportThread, this);
|
m_JsonReportThread = new std::thread(CReflector::JsonReportThread, this);
|
||||||
#endif
|
#endif
|
||||||
|
sd_notify(0, "READY=1");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
CC=g++
|
CC=g++
|
||||||
CFLAGS=-c -std=c++11 -pthread
|
CFLAGS=-c -std=c++11 -pthread
|
||||||
LDFLAGS=-std=c++11 -pthread
|
LDFLAGS=-std=c++11 -pthread -lsystemd
|
||||||
SOURCES=$(wildcard *.cpp)
|
SOURCES=$(wildcard *.cpp)
|
||||||
OBJECTS=$(SOURCES:.cpp=.o)
|
OBJECTS=$(SOURCES:.cpp=.o)
|
||||||
EXECUTABLE=xlxd
|
EXECUTABLE=xlxd
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue