From e01e34db22eb770efd0cb752bcfe4aad28157c93 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 27 Jun 2014 21:39:28 +0200 Subject: Provide an example unit file for systemd --- unit/biboumi.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 unit/biboumi.service (limited to 'unit') diff --git a/unit/biboumi.service b/unit/biboumi.service new file mode 100644 index 0000000..579ac4e --- /dev/null +++ b/unit/biboumi.service @@ -0,0 +1,14 @@ +[Unit] +Description=Biboumi, XMPP to IRC gateway +After=network.target + +[Service] +Type=notify +ExecStart=/usr/bin/biboumi /etc/biboumi/biboumi.cfg +ExecReload=/bin/kill -s USR1 $MAINPID +ExecStop=/bin/kill -s INT $MAINPID +WatchdogSec=10 +Restart=always + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3 From 7d99ba8dd9aa5845741bb50d598082bb55c0adac Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 31 Jul 2014 15:27:11 +0200 Subject: Run the service with the nobody user --- unit/biboumi.service | 2 ++ 1 file changed, 2 insertions(+) (limited to 'unit') diff --git a/unit/biboumi.service b/unit/biboumi.service index 579ac4e..1bb4f63 100644 --- a/unit/biboumi.service +++ b/unit/biboumi.service @@ -9,6 +9,8 @@ ExecReload=/bin/kill -s USR1 $MAINPID ExecStop=/bin/kill -s INT $MAINPID WatchdogSec=10 Restart=always +User=nobody +Group=nobody [Install] WantedBy=multi-user.target -- cgit v1.2.3 From e46c3c004d56c4ebcb010caded04a429435d5364 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 21 Apr 2015 02:51:10 +0200 Subject: Do not specify an ExecStop= line in the unit file --- unit/biboumi.service | 1 - 1 file changed, 1 deletion(-) (limited to 'unit') diff --git a/unit/biboumi.service b/unit/biboumi.service index 1bb4f63..59001a6 100644 --- a/unit/biboumi.service +++ b/unit/biboumi.service @@ -6,7 +6,6 @@ After=network.target Type=notify ExecStart=/usr/bin/biboumi /etc/biboumi/biboumi.cfg ExecReload=/bin/kill -s USR1 $MAINPID -ExecStop=/bin/kill -s INT $MAINPID WatchdogSec=10 Restart=always User=nobody -- cgit v1.2.3 From 25475b60ab363299ddbe5e81ded8968b76838b44 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 13 Jan 2016 19:44:58 +0100 Subject: Generate systemd file from template and make installs it and the conf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The unit file Type=, as well as the executable path should now be correct with a simple “make install”, whatever the install prefix and the DESTDIR values are. ref #3152 --- unit/biboumi.service | 15 --------------- unit/biboumi.service.cmake | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 unit/biboumi.service create mode 100644 unit/biboumi.service.cmake (limited to 'unit') diff --git a/unit/biboumi.service b/unit/biboumi.service deleted file mode 100644 index 59001a6..0000000 --- a/unit/biboumi.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Biboumi, XMPP to IRC gateway -After=network.target - -[Service] -Type=notify -ExecStart=/usr/bin/biboumi /etc/biboumi/biboumi.cfg -ExecReload=/bin/kill -s USR1 $MAINPID -WatchdogSec=10 -Restart=always -User=nobody -Group=nobody - -[Install] -WantedBy=multi-user.target diff --git a/unit/biboumi.service.cmake b/unit/biboumi.service.cmake new file mode 100644 index 0000000..0a9b76b --- /dev/null +++ b/unit/biboumi.service.cmake @@ -0,0 +1,15 @@ +[Unit] +Description=Biboumi, XMPP to IRC gateway +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 +Restart=always +User=nobody +Group=nobody + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3 From d58dcde856aa1885e0eb4a1286eeaa6e4861557b Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 14 Jan 2016 14:33:49 +0100 Subject: =?UTF-8?q?Only=20activate=20systemd=E2=80=99s=20watchdog=20if=20w?= =?UTF-8?q?e=20are=20compiling=20with=20systemd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #3152 --- unit/biboumi.service.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'unit') diff --git a/unit/biboumi.service.cmake b/unit/biboumi.service.cmake index 0a9b76b..4685f43 100644 --- a/unit/biboumi.service.cmake +++ b/unit/biboumi.service.cmake @@ -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 -- cgit v1.2.3 From ad15924ac3f0852214fd35d93482fc18dbbe4bec Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 11 Jun 2016 01:34:03 +0100 Subject: =?UTF-8?q?Allow=20cmake=20to=20configure=20the=20systemd=20unit?= =?UTF-8?q?=E2=80=99s=20user=20and=20group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unit/biboumi.service.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unit') diff --git a/unit/biboumi.service.cmake b/unit/biboumi.service.cmake index 4685f43..1cdf4e1 100644 --- a/unit/biboumi.service.cmake +++ b/unit/biboumi.service.cmake @@ -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 -- cgit v1.2.3 From 29567eefcf797d1530630a2cc3121df3874c5fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sat, 2 Jul 2016 15:09:38 +0200 Subject: Add https to the unit file DOC thing --- unit/biboumi.service.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unit') diff --git a/unit/biboumi.service.cmake b/unit/biboumi.service.cmake index 1cdf4e1..150045b 100644 --- a/unit/biboumi.service.cmake +++ b/unit/biboumi.service.cmake @@ -1,6 +1,6 @@ [Unit] Description=Biboumi, XMPP to IRC gateway -Documentation=man:biboumi(1) http://biboumi.louiz.org +Documentation=man:biboumi(1) https://biboumi.louiz.org After=network.target [Service] -- cgit v1.2.3