Commit d58dcde8 authored by louiz’'s avatar louiz’

Only activate systemd’s watchdog if we are compiling with systemd

ref #3152
parent 0864f2ab
...@@ -242,7 +242,9 @@ configure_file(biboumi.h.cmake src/biboumi.h) ...@@ -242,7 +242,9 @@ configure_file(biboumi.h.cmake src/biboumi.h)
if(SYSTEMD_FOUND) if(SYSTEMD_FOUND)
set(SYSTEMD_SERVICE_TYPE "notify") set(SYSTEMD_SERVICE_TYPE "notify")
set(WATCHDOG_SEC "20")
else() else()
set(SYSTEMD_SERVICE_TYPE "simple") set(SYSTEMD_SERVICE_TYPE "simple")
set(WATCHDOG_SEC "")
endif() endif()
configure_file(unit/biboumi.service.cmake biboumi.service) configure_file(unit/biboumi.service.cmake biboumi.service)
[Unit] [Unit]
Description=Biboumi, XMPP to IRC gateway Description=Biboumi, XMPP to IRC gateway
Documentation=man:biboumi(1) http://biboumi.louiz.org
After=network.target After=network.target
[Service] [Service]
Type=${SYSTEMD_SERVICE_TYPE} Type=${SYSTEMD_SERVICE_TYPE}
ExecStart=${CMAKE_INSTALL_PREFIX}/bin/biboumi /etc/biboumi/biboumi.cfg ExecStart=${CMAKE_INSTALL_PREFIX}/bin/biboumi /etc/biboumi/biboumi.cfg
ExecReload=/bin/kill -s USR1 $MAINPID ExecReload=/bin/kill -s USR1 $MAINPID
WatchdogSec=10 WatchdogSec=${WATCHDOG_SEC}
Restart=always Restart=always
User=nobody User=nobody
Group=nobody Group=nobody
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment