mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
Add a systemd service file for the headless server
This commit is contained in:
parent
6a1ba45a4d
commit
0372dc4cec
@ -5,15 +5,15 @@ QMAKE_TARGET_BUNDLE_PREFIX = "com.yacreader"
|
|||||||
|
|
||||||
CONFIG += console
|
CONFIG += console
|
||||||
DEPENDPATH += ../YACReaderLibrary
|
DEPENDPATH += ../YACReaderLibrary
|
||||||
INCLUDEPATH += ../YACReaderLibrary
|
INCLUDEPATH += ../YACReaderLibrary \
|
||||||
INCLUDEPATH += ../common \
|
../common \
|
||||||
../YACReaderLibrary/server \
|
../YACReaderLibrary/server \
|
||||||
../YACReaderLibrary/db
|
../YACReaderLibrary/db
|
||||||
|
|
||||||
DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY QT_NO_DEBUG_OUTPUT
|
DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY QT_NO_DEBUG_OUTPUT
|
||||||
QMAKE_MAC_SDK = macosx10.12
|
QMAKE_MAC_SDK = macosx10.12
|
||||||
#load default build flags
|
# load default build flags
|
||||||
#do a basic dependency check
|
# do a basic dependency check
|
||||||
include(headless_config.pri)
|
include(headless_config.pri)
|
||||||
include(../dependencies/pdf_backend.pri)
|
include(../dependencies/pdf_backend.pri)
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ SOURCES += ../YACReaderLibrary/library_creator.cpp \
|
|||||||
main.cpp
|
main.cpp
|
||||||
|
|
||||||
include(../YACReaderLibrary/server/server.pri)
|
include(../YACReaderLibrary/server/server.pri)
|
||||||
CONFIG(7zip){
|
CONFIG(7zip) {
|
||||||
include(../compressed_archive/wrapper.pri)
|
include(../compressed_archive/wrapper.pri)
|
||||||
} else:CONFIG(unarr) {
|
} else:CONFIG(unarr) {
|
||||||
include(../compressed_archive/unarr/unarr-wrapper.pri)
|
include(../compressed_archive/unarr/unarr-wrapper.pri)
|
||||||
@ -89,7 +89,6 @@ include(../compressed_archive/unarr/unarr-wrapper.pri)
|
|||||||
}
|
}
|
||||||
include(../QsLog/QsLog.pri)
|
include(../QsLog/QsLog.pri)
|
||||||
|
|
||||||
|
|
||||||
TRANSLATIONS = yacreaderlibraryserver_es.ts \
|
TRANSLATIONS = yacreaderlibraryserver_es.ts \
|
||||||
yacreaderlibraryserver_ru.ts \
|
yacreaderlibraryserver_ru.ts \
|
||||||
yacreaderlibraryserver_pt.ts \
|
yacreaderlibraryserver_pt.ts \
|
||||||
@ -123,13 +122,13 @@ DEFINES += "LIBDIR=\\\"$$LIBDIR\\\"" "DATADIR=\\\"$$DATADIR\\\"" "BINDIR=\\\"$$
|
|||||||
|
|
||||||
#make install
|
#make install
|
||||||
CONFIG(server_standalone) {
|
CONFIG(server_standalone) {
|
||||||
INSTALLS += bin server translation
|
INSTALLS += bin server translation systemd
|
||||||
}
|
}
|
||||||
else:CONFIG(server_bundled) {
|
else:CONFIG(server_bundled) {
|
||||||
INSTALLS += bin
|
INSTALLS += bin systemd
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
INSTALLS += bin server translation
|
INSTALLS += bin server translation systemd
|
||||||
message("No build type specified. Defaulting to standalone server build (CONFIG+=server_standalone).")
|
message("No build type specified. Defaulting to standalone server build (CONFIG+=server_standalone).")
|
||||||
message("If you wish to run YACReaderLibraryServer on a system with an existing install of YACReaderLibrary,\
|
message("If you wish to run YACReaderLibraryServer on a system with an existing install of YACReaderLibrary,\
|
||||||
please specify CONFIG+=server_bundled as an option when running qmake.")
|
please specify CONFIG+=server_bundled as an option when running qmake.")
|
||||||
@ -145,11 +144,13 @@ isEmpty(DESTDIR) {
|
|||||||
server.path = $$DATADIR/yacreader
|
server.path = $$DATADIR/yacreader
|
||||||
server.files = ../release/server
|
server.files = ../release/server
|
||||||
|
|
||||||
|
systemd.path = $$LIBDIR/systemd/system
|
||||||
|
systemd.files = yacreaderlibraryserver.service
|
||||||
|
|
||||||
translation.path = $$DATADIR/yacreader/languages
|
translation.path = $$DATADIR/yacreader/languages
|
||||||
translation.files = ../release/languages/yacreaderlibrary_*
|
translation.files = ../release/languages/yacreaderlibrary_*
|
||||||
|
|
||||||
# TODO: We need a manpage for yaclibserver
|
# TODO: We need a manpage for yaclibserver
|
||||||
# TODO: We need a systemd service file for yaclibserver
|
|
||||||
#manpage.path = $$DATADIR/man/man1
|
#manpage.path = $$DATADIR/man/man1
|
||||||
#manpage.files = ../YACReaderLibrary.1
|
#manpage.files = ../YACReaderLibrary.1
|
||||||
}
|
}
|
||||||
|
11
YACReaderLibraryServer/yacreaderlibraryserver.service
Normal file
11
YACReaderLibraryServer/yacreaderlibraryserver.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=YACReaderLibrary headless server
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=always
|
||||||
|
ExecStart=/usr/bin/YACReaderLibraryServer start
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user