[pve-devel] [RFC v2 ha-manager 2/7] lrm service: move PID file to service's runtime directory
Fiona Ebner
f.ebner at proxmox.com
Tue Jun 20 12:54:31 CEST 2023
it's arguably cleaner to put it there, now that there is one.
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
No changes in v2.
debian/pve-ha-lrm.service | 2 +-
src/PVE/Service/pve_ha_lrm.pm | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/debian/pve-ha-lrm.service b/debian/pve-ha-lrm.service
index 9f3f73d..d9fcf87 100644
--- a/debian/pve-ha-lrm.service
+++ b/debian/pve-ha-lrm.service
@@ -21,7 +21,7 @@ After=watchdog-mux.service
[Service]
ExecStart=/usr/sbin/pve-ha-lrm start
ExecStop=/usr/sbin/pve-ha-lrm stop
-PIDFile=/run/pve-ha-lrm.pid
+PIDFile=/run/pve-ha-lrm/pve-ha-lrm.pid
RuntimeDirectory=pve-ha-lrm
TimeoutStopSec=infinity
KillMode=process
diff --git a/src/PVE/Service/pve_ha_lrm.pm b/src/PVE/Service/pve_ha_lrm.pm
index 91a9409..0790215 100644
--- a/src/PVE/Service/pve_ha_lrm.pm
+++ b/src/PVE/Service/pve_ha_lrm.pm
@@ -13,7 +13,10 @@ use base qw(PVE::Daemon);
my $cmdline = [$0, @ARGV];
-my %daemon_options = (stop_wait_time => 60*60);
+my %daemon_options = (
+ stop_wait_time => 60*60,
+ pidfile => '/run/pve-ha-lrm/pve-ha-lrm.pid',
+);
my $daemon = __PACKAGE__->new('pve-ha-lrm', $cmdline, %daemon_options);
--
2.39.2
More information about the pve-devel
mailing list