summaryrefslogtreecommitdiffstats
path: root/debian/patches/ctdb-create-piddir.patch
blob: 708f7876772dada8d116028420cf84016865a435 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Michael Tokarev <mjt@tls.msk.ru>
Date: Fri, 09 Sep 2022 12:49:55 +0300
Subject: create ctdb pid directory

(which is /run/ctdb/). Create it in the systemd service
file (using RuntimeDirectory directive) and in the sysv-init
script.

diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init
index 7fe8f0085ae..57fd0dda63d 100755
--- a/ctdb/config/ctdb.init
+++ b/ctdb/config/ctdb.init
@@ -78,4 +78,5 @@ start()
 	    ;;
 	debian)
+	    mkdir -p -m0755 ${pidfile%/*}
 	    eval start-stop-daemon --start --quiet --background --exec "$ctdbd"
 	    ;;
diff --git a/packaging/systemd/ctdb.service.in b/packaging/systemd/ctdb.service.in
index 7905a93e242..eefc7468a44 100644
--- a/packaging/systemd/ctdb.service.in
+++ b/packaging/systemd/ctdb.service.in
@@ -12,2 +12,3 @@ TasksMax=4096
 PIDFile=@CTDB_RUNDIR@/ctdbd.pid
+RuntimeDirectory=ctdb
 ExecStart=@SBINDIR@/ctdbd