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
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
Type=notify
|
||||
User=xlxd
|
||||
Group=xlxd
|
||||
AmbientCapabilities=CAP_NET_RAW
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue