From fc1be4c2b49f2237e8eeadccf32fd517d97b3b97 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Wed, 7 Feb 2024 08:57:24 +0000 Subject: T5586: delete old systemd unit keepalived service The custom systemd unit is not required as we generate 10-override which was implemented in https://github.com/vyos/vyos-1x/pull/2310/commits/5a6938a2e14373dfaa72211fe18deeb257d3ba12 --- src/systemd/keepalived.service | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 src/systemd/keepalived.service diff --git a/src/systemd/keepalived.service b/src/systemd/keepalived.service deleted file mode 100644 index a462d8614..000000000 --- a/src/systemd/keepalived.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Keepalive Daemon (LVS and VRRP) -After=vyos-router.service -# Only start if there is a configuration file -ConditionFileNotEmpty=/run/keepalived/keepalived.conf - -[Service] -KillMode=process -Type=simple -# Read configuration variable file if it is present -ExecStart=/usr/sbin/keepalived --use-file /run/keepalived/keepalived.conf --pid /run/keepalived/keepalived.pid --dont-fork --snmp -ExecReload=/bin/kill -HUP $MAINPID -PIDFile=/run/keepalived/keepalived.pid -- cgit v1.2.3 From 7f2483dac12564023571edef48bfa912009c6d5e Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Wed, 7 Feb 2024 10:25:48 +0000 Subject: T5586: Improve systemd keepalived override file --- data/templates/vrrp/10-override.conf.j2 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/data/templates/vrrp/10-override.conf.j2 b/data/templates/vrrp/10-override.conf.j2 index 4a16012b6..dd0216d23 100644 --- a/data/templates/vrrp/10-override.conf.j2 +++ b/data/templates/vrrp/10-override.conf.j2 @@ -2,14 +2,10 @@ {% set snmp = '--snmp' if snmp is defined else '' %} [Unit] After=vyos-router.service -# Only start if there is our configuration file - remove Debian default -# config file from the condition list -ConditionFileNotEmpty= +# Only start if there is our configuration file ConditionFileNotEmpty=/run/keepalived/keepalived.conf [Service] -KillMode=process -Type=simple # Read configuration variable file if it is present ExecStart= ExecStart=/usr/sbin/keepalived --use-file /run/keepalived/keepalived.conf --pid /run/keepalived/keepalived.pid --dont-fork {{ snmp }} -- cgit v1.2.3