From ce1c5f3dbec8788a293b31823aac340b0c3eb394 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Fri, 22 Jan 2021 13:25:54 +0000 Subject: [PATCH] Adjust systemd unit - Adjust paths for the packaged crowdsec binary (/usr/bin). - Drop commented out ExecStartPost entirely. - Drop syslog.target dependency, it's socket-activated (thanks to the systemd-service-file-refers-to-obsolete-target lintian tag). - Ensure both local and online API credentials have been defined. Gbp-Pq: Name 0003-adjust-systemd-unit.patch --- config/crowdsec.service | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/crowdsec.service b/config/crowdsec.service index 4b6c26f..c9d7150 100644 --- a/config/crowdsec.service +++ b/config/crowdsec.service @@ -1,13 +1,15 @@ [Unit] Description=Crowdsec agent -After=syslog.target network.target remote-fs.target nss-lookup.target +After=network.target remote-fs.target nss-lookup.target +# Ensure configuration happened: +ConditionPathExists=/etc/crowdsec/local_api_credentials.yaml +ConditionPathExists=/etc/crowdsec/online_api_credentials.yaml [Service] Type=notify Environment=LC_ALL=C LANG=C -ExecStartPre=/usr/local/bin/crowdsec -c /etc/crowdsec/config.yaml -t -ExecStart=/usr/local/bin/crowdsec -c /etc/crowdsec/config.yaml -#ExecStartPost=/bin/sleep 0.1 +ExecStartPre=/usr/bin/crowdsec -c /etc/crowdsec/config.yaml -t +ExecStart=/usr/bin/crowdsec -c /etc/crowdsec/config.yaml ExecReload=/bin/kill -HUP $MAINPID [Install] -- 2.30.2