~singpolyma/biboumi

ad15924ac3f0852214fd35d93482fc18dbbe4bec — Emmanuel Gil Peyrot 6 years ago 272c0e4
Allow cmake to configure the systemd unit’s user and group
2 files changed, 8 insertions(+), 2 deletions(-)

M CMakeLists.txt
M unit/biboumi.service.cmake
M CMakeLists.txt => CMakeLists.txt +6 -0
@@ 267,6 267,12 @@ else()
  set(SYSTEMD_SERVICE_TYPE "simple")
  set(WATCHDOG_SEC "")
endif()
if(NOT DEFINED SERVICE_USER)
  set(SERVICE_USER "nobody")
endif()
if(NOT DEFINED SERVICE_GROUP)
  set(SERVICE_GROUP "nobody")
endif()
configure_file(unit/biboumi.service.cmake biboumi.service)

# The date MUST be in english format

M unit/biboumi.service.cmake => unit/biboumi.service.cmake +2 -2
@@ 9,8 9,8 @@ ExecStart=${CMAKE_INSTALL_PREFIX}/bin/biboumi /etc/biboumi/biboumi.cfg
ExecReload=/bin/kill -s USR1 $MAINPID
WatchdogSec=${WATCHDOG_SEC}
Restart=always
User=nobody
Group=nobody
User=${SERVICE_USER}
Group=${SERVICE_GROUP}

[Install]
WantedBy=multi-user.target