~singpolyma/biboumi

d58dcde856aa1885e0eb4a1286eeaa6e4861557b — Florent Le Coz 7 years ago 0864f2a
Only activate systemd’s watchdog if we are compiling with systemd

ref #3152
2 files changed, 4 insertions(+), 1 deletions(-)

M CMakeLists.txt
M unit/biboumi.service.cmake
M CMakeLists.txt => CMakeLists.txt +2 -0
@@ 242,7 242,9 @@ configure_file(biboumi.h.cmake src/biboumi.h)

if(SYSTEMD_FOUND)
  set(SYSTEMD_SERVICE_TYPE "notify")
  set(WATCHDOG_SEC "20")
else()
  set(SYSTEMD_SERVICE_TYPE "simple")
  set(WATCHDOG_SEC "")
endif()
configure_file(unit/biboumi.service.cmake biboumi.service)

M unit/biboumi.service.cmake => unit/biboumi.service.cmake +2 -1
@@ 1,12 1,13 @@
[Unit]
Description=Biboumi, XMPP to IRC gateway
Documentation=man:biboumi(1) http://biboumi.louiz.org
After=network.target

[Service]
Type=${SYSTEMD_SERVICE_TYPE}
ExecStart=${CMAKE_INSTALL_PREFIX}/bin/biboumi /etc/biboumi/biboumi.cfg
ExecReload=/bin/kill -s USR1 $MAINPID
WatchdogSec=10
WatchdogSec=${WATCHDOG_SEC}
Restart=always
User=nobody
Group=nobody